Szerkesztés

Megosztás a következőn keresztül:


RedirectClient class

Extends

Constructors

RedirectClient(BrowserConfiguration, BrowserCacheManager, ICrypto, Logger, EventHandler, INavigationClient, IPerformanceClient, BrowserCacheManager, NativeMessageHandler, string)

Methods

acquireToken(RedirectRequest)

Redirects the page to the /authorize endpoint of the IDP

handleRedirectPromise(string)

Checks if navigateToLoginRequestUrl is set, and:

  • if true, performs logic to cache and navigate
  • if false, handles hash string and parses response
logout(EndSessionRequest)

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.

Inherited Methods

getRedirectUri(string)

Use to get the redirect uri configured in MSAL or null.

Constructor Details

RedirectClient(BrowserConfiguration, BrowserCacheManager, ICrypto, Logger, EventHandler, INavigationClient, IPerformanceClient, BrowserCacheManager, NativeMessageHandler, string)

new RedirectClient(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeStorageImpl: BrowserCacheManager, nativeMessageHandler?: NativeMessageHandler, correlationId?: string)

Parameters

storageImpl
BrowserCacheManager
browserCrypto

ICrypto

logger

Logger

eventHandler
EventHandler
navigationClient
INavigationClient
performanceClient

IPerformanceClient

nativeStorageImpl
BrowserCacheManager
nativeMessageHandler
NativeMessageHandler
correlationId

string

Method Details

acquireToken(RedirectRequest)

Redirects the page to the /authorize endpoint of the IDP

function acquireToken(request: RedirectRequest): Promise<void>

Parameters

request
RedirectRequest

Returns

Promise<void>

handleRedirectPromise(string)

Checks if navigateToLoginRequestUrl is set, and:

  • if true, performs logic to cache and navigate
  • if false, handles hash string and parses response
function handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>

Parameters

hash

string

Returns

Promise<AuthenticationResult | null>

logout(EndSessionRequest)

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.

function logout(logoutRequest?: EndSessionRequest): Promise<void>

Parameters

logoutRequest
EndSessionRequest

Returns

Promise<void>

Inherited Method Details

getRedirectUri(string)

Use to get the redirect uri configured in MSAL or null.

function getRedirectUri(requestRedirectUri?: string): string

Parameters

requestRedirectUri

string

Returns

string

Redirect URL

Inherited From BaseInteractionClient.getRedirectUri