PopupClient class
- Extends
acquire |
Acquires tokens by opening a popup window to the /authorize endpoint of the authority |
clean |
Closes popup, removes any state vars created during popup calls. |
generate |
Generates the name for the popup based on the client id and request for logouts |
generate |
Generates the name for the popup based on the client id and request |
initiate |
Opens a popup window with given request Url. |
logout(End |
Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server |
monitor |
Monitors a window until it loads a url with the same origin. |
open |
Helper function to set popup window dimensions and position |
unload |
Event callback to unload main window. |
wait |
Waits for user interaction in logout popup window |
get |
Use to get the redirect uri configured in MSAL or null. |
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
- config
- BrowserConfiguration
- storageImpl
- BrowserCacheManager
- browserCrypto
-
ICrypto
- logger
-
Logger
- eventHandler
- EventHandler
- navigationClient
- INavigationClient
- performanceClient
-
IPerformanceClient
- nativeStorageImpl
- BrowserCacheManager
- nativeMessageHandler
- NativeMessageHandler
- correlationId
-
string
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>
Closes popup, removes any state vars created during popup calls.
function cleanPopup(popupWindow?: Window)
Parameters
- popupWindow
-
Window
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
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
Opens a popup window with given request Url.
function initiateAuthRequest(requestUrl: string, params: PopupParams): Window
Parameters
- requestUrl
-
string
- params
- PopupParams
Returns
Window
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>
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>
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
Event callback to unload main window.
function unloadWindow(e: Event)
Parameters
- e
-
Event
Waits for user interaction in logout popup window
function waitForLogoutPopup(popupWindow: Window): Promise<void>
Parameters
- popupWindow
-
Window
Returns
Promise<void>
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