Function completeAuthorizationCodeGrant

  • Experimental

    Attempt to exchange authorization code for bearer token.

    Takes the authorization code returned by the OpenID Provider via the authorization URL, and makes a request to the Token Endpoint, to obtain the access token, refresh token, etc.

    Parameters

    • code: string

      authorization code as returned by OP during authorization

    • state: string

    Returns Promise<{
        homeserverUrl: string;
        idTokenClaims: IdTokenClaims;
        identityServerUrl?: string;
        oidcClientSettings: {
            clientId: string;
            issuer: string;
        };
        tokenResponse: BearerTokenResponse;
    }>

    valid bearer token response

    Throws

    An Error with message set to an entry in OidcError, when the request fails, or the returned token response is invalid.

Generated using TypeDoc