How to use the @openid/appauth/built/token_request.js.TokenRequest 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
function makeRefreshTokenRequest(configuration, code) {
    // use the code to make the token request.
    let request = new TokenRequest(
        idpConfig.clientId, idpConfig.redirectUri, GRANT_TYPE_AUTHORIZATION_CODE, code, undefined, {'client_secret': idpConfig.clientSecret});

    return tokenHandler.performTokenRequest(configuration, request).then(response => {
      logger.info('retrieved oauth2 refresh token', {category: 'openid-connect'});
      return response;
    });
  }
github gyselroth / balloon-client-desktop / app / lib / oidc / controller.js View on Github external
function makeAccessTokenRequest(configuration, refreshToken) {
    let request = new TokenRequest(
        idpConfig.clientId, idpConfig.redirectUri, GRANT_TYPE_REFRESH_TOKEN, undefined, refreshToken, {'client_secret': idpConfig.clientSecret});

    return tokenHandler.performTokenRequest(configuration, request).then(response => {
      logger.info('retrieved oauth2 access token', {category: 'openid-connect'});
      return response;
    });
  }