Options
All
  • Public
  • Public/Protected
  • All
Menu

UserAgentApplication class

Object Instance that the developer can use to make loginXX OR acquireTokenXX functions

Hierarchy

  • UserAgentApplication

Index

Constructors

constructor

Accessors

authority

  • get authority(): string
  • set authority(val: string): void

Methods

acquireTokenPopup

acquireTokenRedirect

acquireTokenSilent

  • Use this function to obtain a token before every call to the API / resource provider

    MSAL return's a cached token when available Or it send's a request to the STS to obtain a new token using a hidden iframe.

    Parameters

    Returns Promise<AuthResponse>

    • a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the AuthResponse object

getAccount

  • Returns the signed in account (the account object is created at the time of successful login) or null when no state is found

    Returns Account

    Account - the account object stored in MSAL

getAllAccounts

getAuthorityInstance

  • getAuthorityInstance(): Authority
  • Get the current authority instance from the MSAL configuration object

    Returns Authority

    {@link Authority} authority instance

getCurrentConfiguration

getLoginInProgress

  • getLoginInProgress(): boolean

getPostLogoutRedirectUri

  • getPostLogoutRedirectUri(): string
  • Use to get the post logout redirect uri configured in MSAL or null. Evaluates postLogoutredirectUri if its a function, otherwise simply returns its value.

    Returns string

    post logout redirect URL

getRedirectUri

  • getRedirectUri(reqRedirectUri?: string): string
  • Use to get the redirect uri configured in MSAL or null. Evaluates redirectUri if its a function, otherwise simply returns its value.

    Parameters

    • Optional reqRedirectUri: string

    Returns string

    redirect URL

handleRedirectCallback

loginPopup

loginRedirect

logout

  • logout(correlationId?: string): void
  • Use to log out the current user, and redirect the user to the postLogoutRedirectUri. Default behaviour is to redirect the user to window.location.href.

    Parameters

    • Optional correlationId: string

    Returns void

setLogger

  • setLogger(logger: Logger): void

ssoSilent

urlContainsHash

  • urlContainsHash(hash: string): boolean
  • Public API to verify if the URL contains the hash with known properties

    Parameters

    • hash: string

    Returns boolean

Generated using TypeDoc