Labb - DX Accelerator
    Preparing search index...

    Class OAuth2Service

    Index

    Constructors

    Methods

    • Decodes the operator information stored in the JWT token.

      Parameters

      • token: string

        The OAuth2 access token as a base64 encoded string

      Returns any

      The claims inside the payload of the token as a JSON object. See e.g. standard claims for the standard claims of an openid token.

    • Acquires an access token using the OAuth2 authorization code flow.

      Parameters

      • config: OAuth2Config

        The OAuth2 configuration object containing the Infinity server URL, client ID, client secret and optionally the pkce flag, the appId and the authService.

      Returns Promise<TokenInfo>

      A Promise that resolves to a TokenInfo object containing the acquired access token.

    • Acquires an access token using the OAuth2 client credentials flow.

      Parameters

      • config: OAuth2Config

        The OAuth2 configuration object containing the Infinity server URL, client ID, client secret, username, and password.

      Returns Promise<TokenInfo>

      A Promise that resolves to a TokenInfo object containing the acquired access token.