IPublicClientApplication interface
方法
方法详细信息
acquireTokenByCode(AuthorizationCodeRequest)
function acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>
参数
- request
- AuthorizationCodeRequest
返回
Promise<AuthenticationResult>
acquireTokenPopup(PopupRequest)
function acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>
参数
- request
- PopupRequest
返回
Promise<AuthenticationResult>
acquireTokenRedirect(RedirectRequest)
function acquireTokenRedirect(request: RedirectRequest): Promise<void>
参数
- request
- RedirectRequest
返回
Promise<void>
acquireTokenSilent(SilentRequest)
function acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>
参数
- silentRequest
- SilentRequest
返回
Promise<AuthenticationResult>
addEventCallback(EventCallbackFunction, EventType[])
function addEventCallback(callback: EventCallbackFunction, eventTypes?: EventType[]): null | string
参数
- callback
- EventCallbackFunction
- eventTypes
返回
null | string
addPerformanceCallback(PerformanceCallbackFunction)
function addPerformanceCallback(callback: PerformanceCallbackFunction): string
参数
- callback
- PerformanceCallbackFunction
返回
string
clearCache(ClearCacheRequest)
function clearCache(logoutRequest?: ClearCacheRequest): Promise<void>
参数
- logoutRequest
- ClearCacheRequest
返回
Promise<void>
disableAccountStorageEvents()
function disableAccountStorageEvents()
enableAccountStorageEvents()
function enableAccountStorageEvents()
getAccount(AccountFilter)
function getAccount(accountFilter: AccountFilter): null | AccountInfo
参数
- accountFilter
- AccountFilter
返回
null | AccountInfo
getAccountByHomeId(string)
function getAccountByHomeId(homeAccountId: string): null | AccountInfo
参数
- homeAccountId
-
string
返回
null | AccountInfo
getAccountByLocalId(string)
function getAccountByLocalId(localId: string): null | AccountInfo
参数
- localId
-
string
返回
null | AccountInfo
getAccountByUsername(string)
function getAccountByUsername(userName: string): null | AccountInfo
参数
- userName
-
string
返回
null | AccountInfo
getActiveAccount()
getAllAccounts()
getLogger()
getTokenCache()
handleRedirectPromise(string)
function handleRedirectPromise(hash?: string): Promise<null | AuthenticationResult>
参数
- hash
-
string
返回
Promise<null | AuthenticationResult>
hydrateCache(AuthenticationResult, PopupRequest | RedirectRequest | SilentRequest | Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>)
function hydrateCache(result: AuthenticationResult, request: PopupRequest | RedirectRequest | SilentRequest | Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>): Promise<void>
参数
- result
- AuthenticationResult
- request
-
PopupRequest | RedirectRequest | SilentRequest | Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>
返回
Promise<void>
initialize(InitializeApplicationRequest)
function initialize(request?: InitializeApplicationRequest): Promise<void>
参数
- request
- InitializeApplicationRequest
返回
Promise<void>
initializeWrapperLibrary(WrapperSKU, string)
function initializeWrapperLibrary(sku: WrapperSKU, version: string)
参数
- sku
- WrapperSKU
- version
-
string
loginPopup(PopupRequest)
function loginPopup(request?: PopupRequest): Promise<AuthenticationResult>
参数
- request
- PopupRequest
返回
Promise<AuthenticationResult>
loginRedirect(RedirectRequest)
function loginRedirect(request?: RedirectRequest): Promise<void>
参数
- request
- RedirectRequest
返回
Promise<void>
logout(EndSessionRequest)
function logout(logoutRequest?: EndSessionRequest): Promise<void>
参数
- logoutRequest
- EndSessionRequest
返回
Promise<void>
logoutPopup(EndSessionPopupRequest)
function logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>
参数
- logoutRequest
- EndSessionPopupRequest
返回
Promise<void>
logoutRedirect(EndSessionRequest)
function logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>
参数
- logoutRequest
- EndSessionRequest
返回
Promise<void>
removeEventCallback(string)
function removeEventCallback(callbackId: string)
参数
- callbackId
-
string
removePerformanceCallback(string)
function removePerformanceCallback(callbackId: string): boolean
参数
- callbackId
-
string
返回
boolean
setActiveAccount(null | AccountInfo)
setLogger(Logger)
setNavigationClient(INavigationClient)
function setNavigationClient(navigationClient: INavigationClient)
参数
- navigationClient
- INavigationClient
ssoSilent(Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>)
function ssoSilent(request: Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>): Promise<AuthenticationResult>
参数
- request
-
Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "earJwk" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>
返回
Promise<AuthenticationResult>