Options
All
  • Public
  • Public/Protected
  • All
Menu

Base abstract class for all ClientApplications - public and confidential

Hierarchy

Index

Methods

acquireTokenByCode

  • Acquires a token by exchanging the Authorization Code received from the first step of OAuth2.0 Authorization Code flow.

    getAuthCodeUrl(AuthorizationCodeUrlRequest) can be used to create the URL for the first step of OAuth2.0 Authorization Code flow. Ensure that values for redirectUri and scopes in AuthorizationCodeUrlRequest and AuthorizationCodeRequest are the same.

    Parameters

    Returns Promise<AuthenticationResult>

acquireTokenByRefreshToken

  • Acquires a token by exchanging the refresh token provided for a new set of tokens.

    This API is provided only for scenarios where you would like to migrate from ADAL to MSAL. Otherwise, it is recommended that you use acquireTokenSilent() for silent scenarios. When using acquireTokenSilent(), MSAL will handle the caching and refreshing of tokens automatically.

    Parameters

    Returns Promise<AuthenticationResult>

acquireTokenByUsernamePassword

acquireTokenSilent

  • Acquires a token silently when a user specifies the account the token is requested for.

    This API expects the user to provide an account object and looks into the cache to retrieve the token if present. There is also an optional "forceRefresh" boolean the user can send to bypass the cache for access_token and id_token. In case the refresh_token is expired or not found, an error is thrown and the guidance is for the user to call any interactive token acquisition API (eg: acquireTokenByCode()).

    Parameters

    Returns Promise<AuthenticationResult>

getAuthCodeUrl

  • Creates the URL of the authorization request, letting the user input credentials and consent to the application. The URL targets the /authorize endpoint of the authority configured in the application object.

    Once the user inputs their credentials and consents, the authority will send a response to the redirect URI sent in the request and should contain an authorization code, which can then be used to acquire tokens via acquireTokenByCode(AuthorizationCodeRequest).

    Parameters

    Returns Promise<string>

getLogger

getTokenCache

setLogger

  • setLogger(logger: Logger): void

Generated using TypeDoc