Bearbeiten

Freigeben über


NativeInteractionClient class

Extends

Constructors

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

Methods

acquireToken(PopupRequest | SilentRequest | SsoSilentRequest)

Acquire token from native platform via browser extension

acquireTokenRedirect(RedirectRequest)

Acquires a token from native platform then redirects to the redirectUri instead of returning the response

handleRedirectPromise()

If the previous page called native platform for a token using redirect APIs, send the same request again and return the response

logout()

Logout from native platform via browser extension

Inherited Methods

getRedirectUri(string)

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

Constructor Details

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

new NativeInteractionClient(config: BrowserConfiguration, browserStorage: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient, provider: NativeMessageHandler, accountId: string, nativeStorageImpl: BrowserCacheManager, correlationId?: string)

Parameters

browserStorage
BrowserCacheManager
browserCrypto

ICrypto

logger

Logger

eventHandler
EventHandler
navigationClient
INavigationClient
apiId
ApiId
performanceClient

IPerformanceClient

accountId

string

nativeStorageImpl
BrowserCacheManager
correlationId

string

Method Details

acquireToken(PopupRequest | SilentRequest | SsoSilentRequest)

Acquire token from native platform via browser extension

function acquireToken(request: PopupRequest | SilentRequest | SsoSilentRequest): Promise<AuthenticationResult>

Parameters

Returns

Promise<AuthenticationResult>

acquireTokenRedirect(RedirectRequest)

Acquires a token from native platform then redirects to the redirectUri instead of returning the response

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

Parameters

request
RedirectRequest

Returns

Promise<void>

handleRedirectPromise()

If the previous page called native platform for a token using redirect APIs, send the same request again and return the response

function handleRedirectPromise(): Promise<AuthenticationResult | null>

Returns

Promise<AuthenticationResult | null>

logout()

Logout from native platform via browser extension

function logout(): Promise<void>

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