How to use the @openid/appauth/built/authorization_request.js.AuthorizationRequest.RESPONSE_TYPE_CODE function in @openid/appauth

To help you get started, we’ve selected a few @openid/appauth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gyselroth / balloon-client-desktop / app / lib / oidc / controller.js View on Github external
}).catch((error) => {
                    reject(error)
                  });
                });
              }).catch((error) =>{
                reject(error)
              });
            });
        } else {
          reject(error);
        }
    });

    // create a request
    let request = new AuthorizationRequest(
        idpConfig.clientId, idpConfig.redirectUri, idpConfig.scope, AuthorizationRequest.RESPONSE_TYPE_CODE,
        undefined, /* state */
        {'prompt': 'consent', 'access_type': 'offline'});

    logger.info('oauth2 authorization request', {
      category: 'openid-connect',
      config: configuration,
      request: request
    });

    authorizationHandler.performAuthorizationRequest(configuration, request);
   });
  }