編集

次の方法で共有


PopupClient class

Extends

Constructors

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

Methods

acquireToken(PopupRequest)

Acquires tokens by opening a popup window to the /authorize endpoint of the authority

cleanPopup(Window)

Closes popup, removes any state vars created during popup calls.

generateLogoutPopupName(CommonEndSessionRequest)

Generates the name for the popup based on the client id and request for logouts

generatePopupName(Array<string>, string)

Generates the name for the popup based on the client id and request

initiateAuthRequest(string, PopupParams)

Opens a popup window with given request Url.

logout(EndSessionPopupRequest)

Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server

monitorPopupForHash(Window)

Monitors a window until it loads a url with the same origin.

openSizedPopup(string, string, PopupWindowAttributes)

Helper function to set popup window dimensions and position

unloadWindow(Event)

Event callback to unload main window.

waitForLogoutPopup(Window)

Waits for user interaction in logout popup window

Inherited Methods

getRedirectUri(string)

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

Constructor Details

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

new PopupClient(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(PopupRequest)

Acquires tokens by opening a popup window to the /authorize endpoint of the authority

function acquireToken(request: PopupRequest): Promise<AuthenticationResult>

Parameters

request
PopupRequest

Returns

Promise<AuthenticationResult>

cleanPopup(Window)

Closes popup, removes any state vars created during popup calls.

function cleanPopup(popupWindow?: Window)

Parameters

popupWindow

Window

generateLogoutPopupName(CommonEndSessionRequest)

Generates the name for the popup based on the client id and request for logouts

function generateLogoutPopupName(request: CommonEndSessionRequest): string

Parameters

request

CommonEndSessionRequest

Returns

string

generatePopupName(Array<string>, string)

Generates the name for the popup based on the client id and request

function generatePopupName(scopes: Array<string>, authority: string): string

Parameters

scopes

Array<string>

authority

string

Returns

string

initiateAuthRequest(string, PopupParams)

Opens a popup window with given request Url.

function initiateAuthRequest(requestUrl: string, params: PopupParams): Window

Parameters

requestUrl

string

params
PopupParams

Returns

Window

logout(EndSessionPopupRequest)

Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server

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

Parameters

logoutRequest
EndSessionPopupRequest

Returns

Promise<void>

monitorPopupForHash(Window)

Monitors a window until it loads a url with the same origin.

function monitorPopupForHash(popupWindow: Window): Promise<string>

Parameters

popupWindow

Window

window that is being monitored

Returns

Promise<string>

openSizedPopup(string, string, PopupWindowAttributes)

Helper function to set popup window dimensions and position

function openSizedPopup(urlNavigate: string, popupName: string, popupWindowAttributes: PopupWindowAttributes): Window | null

Parameters

urlNavigate

string

popupName

string

popupWindowAttributes
PopupWindowAttributes

Returns

Window | null

unloadWindow(Event)

Event callback to unload main window.

function unloadWindow(e: Event)

Parameters

e

Event

waitForLogoutPopup(Window)

Waits for user interaction in logout popup window

function waitForLogoutPopup(popupWindow: Window): Promise<void>

Parameters

popupWindow

Window

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