Initial commit

This commit is contained in:
schihei committed 2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 files changed
+5280367

No files matched your search

File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"msal-browser.cjs","sources":["../../msal-common/dist/utils/Constants.mjs","../../msal-common/dist/error/AuthErrorCodes.mjs","../../msal-common/dist/error/AuthError.mjs","../../msal-common/dist/error/ClientAuthErrorCodes.mjs","../../msal-common/dist/error/ClientAuthError.mjs","../../msal-common/dist/crypto/ICrypto.mjs","../../msal-common/dist/logger/Logger.mjs","../../msal-common/dist/packageMetadata.mjs","../../msal-common/dist/authority/AuthorityOptions.mjs","../../msal-common/dist/account/AuthToken.mjs","../../msal-common/dist/utils/TimeUtils.mjs","../../msal-common/dist/cache/utils/CacheHelpers.mjs","../../msal-common/dist/error/ClientConfigurationErrorCodes.mjs","../../msal-common/dist/error/ClientConfigurationError.mjs","../../msal-common/dist/utils/StringUtils.mjs","../../msal-common/dist/request/ScopeSet.mjs","../../msal-common/dist/account/ClientInfo.mjs","../../msal-common/dist/account/AccountInfo.mjs","../../msal-common/dist/authority/AuthorityType.mjs","../../msal-common/dist/account/TokenClaims.mjs","../../msal-common/dist/authority/ProtocolMode.mjs","../../msal-common/dist/cache/entities/AccountEntity.mjs","../../msal-common/dist/utils/UrlUtils.mjs","../../msal-common/dist/url/UrlString.mjs","../../msal-common/dist/authority/AuthorityMetadata.mjs","../../msal-common/dist/error/CacheErrorCodes.mjs","../../msal-common/dist/error/CacheError.mjs","../../msal-common/dist/cache/CacheManager.mjs","../../msal-common/dist/config/ClientConfiguration.mjs","../../msal-common/dist/account/CcsCredential.mjs","../../msal-common/dist/constants/AADServerParamKeys.mjs","../../msal-common/dist/request/RequestValidator.mjs","../../msal-common/dist/request/RequestParameterBuilder.mjs","../../msal-common/dist/authority/OpenIdConfigResponse.mjs","../../msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs","../../msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs","../../msal-common/dist/telemetry/performance/PerformanceEvent.mjs","../../msal-common/dist/utils/FunctionWrappers.mjs","../../msal-common/dist/authority/RegionDiscovery.mjs","../../msal-common/dist/authority/Authority.mjs","../../msal-common/dist/authority/AuthorityFactory.mjs","../../msal-common/dist/error/ServerError.mjs","../../msal-common/dist/network/ThrottlingUtils.mjs","../../msal-common/dist/error/NetworkError.mjs","../../msal-common/dist/client/BaseClient.mjs","../../msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs","../../msal-common/dist/error/InteractionRequiredAuthError.mjs","../../msal-common/dist/utils/ProtocolUtils.mjs","../../msal-common/dist/crypto/PopTokenGenerator.mjs","../../msal-common/dist/cache/persistence/TokenCacheContext.mjs","../../msal-common/dist/response/ResponseHandler.mjs","../../msal-common/dist/utils/ClientAssertionUtils.mjs","../../msal-common/dist/client/AuthorizationCodeClient.mjs","../../msal-common/dist/client/RefreshTokenClient.mjs","../../msal-common/dist/client/SilentFlowClient.mjs","../../msal-common/dist/network/INetworkModule.mjs","../../msal-common/dist/request/AuthenticationHeaderParser.mjs","../../msal-common/dist/telemetry/server/ServerTelemetryManager.mjs","../../msal-common/dist/error/JoseHeaderErrorCodes.mjs","../../msal-common/dist/error/JoseHeaderError.mjs","../../msal-common/dist/crypto/JoseHeader.mjs","../../msal-common/dist/telemetry/performance/StubPerformanceClient.mjs","../../msal-common/dist/telemetry/performance/PerformanceClient.mjs","../../src/error/BrowserAuthErrorCodes.ts","../../src/error/BrowserAuthError.ts","../../src/utils/BrowserConstants.ts","../../src/encode/Base64Encode.ts","../../src/encode/Base64Decode.ts","../../src/crypto/BrowserCrypto.ts","../../src/error/BrowserConfigurationAuthErrorCodes.ts","../../src/error/BrowserConfigurationAuthError.ts","../../src/utils/BrowserUtils.ts","../../src/navigation/NavigationClient.ts","../../src/network/FetchClient.ts","../../src/config/Configuration.ts","../../src/packageMetadata.ts","../../src/operatingcontext/BaseOperatingContext.ts","../../src/naa/BridgeStatusCode.ts","../../src/naa/BridgeProxy.ts","../../src/operatingcontext/NestedAppOperatingContext.ts","../../src/operatingcontext/StandardOperatingContext.ts","../../src/cache/DatabaseStorage.ts","../../src/cache/MemoryStorage.ts","../../src/cache/AsyncMemoryStorage.ts","../../src/crypto/CryptoOps.ts","../../src/cache/CookieStorage.ts","../../src/cache/CacheHelpers.ts","../../src/cache/LocalStorage.ts","../../src/cache/SessionStorage.ts","../../src/utils/BrowserProtocolUtils.ts","../../src/event/EventType.ts","../../src/cache/BrowserCacheManager.ts","../../src/cache/AccountManager.ts","../../src/event/EventHandler.ts","../../src/interaction_client/BaseInteractionClient.ts","../../src/crypto/PkceGenerator.ts","../../src/request/RequestHelpers.ts","../../src/interaction_client/StandardInteractionClient.ts","../../src/error/NativeAuthErrorCodes.ts","../../src/broker/nativeBroker/NativeStatusCodes.ts","../../src/error/NativeAuthError.tLine truncated
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"msal-browser.js","sources":["../../msal-common/dist/utils/Constants.mjs","../../msal-common/dist/error/AuthErrorCodes.mjs","../../msal-common/dist/error/AuthError.mjs","../../msal-common/dist/error/ClientAuthErrorCodes.mjs","../../msal-common/dist/error/ClientAuthError.mjs","../../msal-common/dist/crypto/ICrypto.mjs","../../msal-common/dist/logger/Logger.mjs","../../msal-common/dist/packageMetadata.mjs","../../msal-common/dist/authority/AuthorityOptions.mjs","../../msal-common/dist/account/AuthToken.mjs","../../msal-common/dist/utils/TimeUtils.mjs","../../msal-common/dist/cache/utils/CacheHelpers.mjs","../../msal-common/dist/error/ClientConfigurationErrorCodes.mjs","../../msal-common/dist/error/ClientConfigurationError.mjs","../../msal-common/dist/utils/StringUtils.mjs","../../msal-common/dist/request/ScopeSet.mjs","../../msal-common/dist/account/ClientInfo.mjs","../../msal-common/dist/account/AccountInfo.mjs","../../msal-common/dist/authority/AuthorityType.mjs","../../msal-common/dist/account/TokenClaims.mjs","../../msal-common/dist/authority/ProtocolMode.mjs","../../msal-common/dist/cache/entities/AccountEntity.mjs","../../msal-common/dist/utils/UrlUtils.mjs","../../msal-common/dist/url/UrlString.mjs","../../msal-common/dist/authority/AuthorityMetadata.mjs","../../msal-common/dist/error/CacheErrorCodes.mjs","../../msal-common/dist/error/CacheError.mjs","../../msal-common/dist/cache/CacheManager.mjs","../../msal-common/dist/config/ClientConfiguration.mjs","../../msal-common/dist/account/CcsCredential.mjs","../../msal-common/dist/constants/AADServerParamKeys.mjs","../../msal-common/dist/request/RequestValidator.mjs","../../msal-common/dist/request/RequestParameterBuilder.mjs","../../msal-common/dist/authority/OpenIdConfigResponse.mjs","../../msal-common/dist/authority/CloudInstanceDiscoveryResponse.mjs","../../msal-common/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs","../../msal-common/dist/telemetry/performance/PerformanceEvent.mjs","../../msal-common/dist/utils/FunctionWrappers.mjs","../../msal-common/dist/authority/RegionDiscovery.mjs","../../msal-common/dist/authority/Authority.mjs","../../msal-common/dist/authority/AuthorityFactory.mjs","../../msal-common/dist/error/ServerError.mjs","../../msal-common/dist/network/ThrottlingUtils.mjs","../../msal-common/dist/error/NetworkError.mjs","../../msal-common/dist/client/BaseClient.mjs","../../msal-common/dist/error/InteractionRequiredAuthErrorCodes.mjs","../../msal-common/dist/error/InteractionRequiredAuthError.mjs","../../msal-common/dist/utils/ProtocolUtils.mjs","../../msal-common/dist/crypto/PopTokenGenerator.mjs","../../msal-common/dist/cache/persistence/TokenCacheContext.mjs","../../msal-common/dist/response/ResponseHandler.mjs","../../msal-common/dist/utils/ClientAssertionUtils.mjs","../../msal-common/dist/client/AuthorizationCodeClient.mjs","../../msal-common/dist/client/RefreshTokenClient.mjs","../../msal-common/dist/client/SilentFlowClient.mjs","../../msal-common/dist/network/INetworkModule.mjs","../../msal-common/dist/request/AuthenticationHeaderParser.mjs","../../msal-common/dist/telemetry/server/ServerTelemetryManager.mjs","../../msal-common/dist/error/JoseHeaderErrorCodes.mjs","../../msal-common/dist/error/JoseHeaderError.mjs","../../msal-common/dist/crypto/JoseHeader.mjs","../../msal-common/dist/telemetry/performance/StubPerformanceClient.mjs","../../msal-common/dist/telemetry/performance/PerformanceClient.mjs","../../src/error/BrowserAuthErrorCodes.ts","../../src/error/BrowserAuthError.ts","../../src/utils/BrowserConstants.ts","../../src/encode/Base64Encode.ts","../../src/encode/Base64Decode.ts","../../src/crypto/BrowserCrypto.ts","../../src/error/BrowserConfigurationAuthErrorCodes.ts","../../src/error/BrowserConfigurationAuthError.ts","../../src/utils/BrowserUtils.ts","../../src/navigation/NavigationClient.ts","../../src/network/FetchClient.ts","../../src/config/Configuration.ts","../../src/packageMetadata.ts","../../src/operatingcontext/BaseOperatingContext.ts","../../src/naa/BridgeStatusCode.ts","../../src/naa/BridgeProxy.ts","../../src/operatingcontext/NestedAppOperatingContext.ts","../../src/operatingcontext/StandardOperatingContext.ts","../../src/cache/DatabaseStorage.ts","../../src/cache/MemoryStorage.ts","../../src/cache/AsyncMemoryStorage.ts","../../src/crypto/CryptoOps.ts","../../src/cache/CookieStorage.ts","../../src/cache/CacheHelpers.ts","../../src/cache/LocalStorage.ts","../../src/cache/SessionStorage.ts","../../src/utils/BrowserProtocolUtils.ts","../../src/event/EventType.ts","../../src/cache/BrowserCacheManager.ts","../../src/cache/AccountManager.ts","../../src/event/EventHandler.ts","../../src/interaction_client/BaseInteractionClient.ts","../../src/crypto/PkceGenerator.ts","../../src/request/RequestHelpers.ts","../../src/interaction_client/StandardInteractionClient.ts","../../src/error/NativeAuthErrorCodes.ts","../../src/broker/nativeBroker/NativeStatusCodes.ts","../../src/error/NativeAuthError.tsLine truncated
+66
View File
@@ -0,0 +1,66 @@
/*! @azure/msal-browser v4.5.1 2025-03-04 */
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).msal={})}(this,(function(e){
/*! @azure/msal-common v15.2.0 2025-03-04 */
const t={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},r=400,n=499,o=500,i=599,a=[t.OPENID_SCOPE,t.PROFILE_SCOPE,t.OFFLINE_ACCESS_SCOPE],s=[...a,t.EMAIL_SCOPE],c="Content-Type",l="Content-Length",d="Retry-After",h="X-AnchorMailbox",u="WWW-Authenticate",g="Authentication-Info",p="x-ms-request-id",m="x-ms-httpver",f="active-account-filters",C="common",y="organizations",v="consumers",I="access_token",T="xms_cc",w={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},A={PLAIN:"plain",S256:"S256"},k={QUERY:"query",FRAGMENT:"fragment"},S={...k,FORM_POST:"form_post"},b="authorization_code",E="refresh_token",R="MSSTS",_="ADFS",P="Generic",M="-",N=".",O={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},q="appmetadata",U="1",L="authority-metadata",H=86400,x="config",B="cache",D="network",F="hardcoded_values",K={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},z={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},G=60,$=3600,Q="throttling",W="retry-after, h429",j="invalid_grant",V="client_mismatch",Y="username",J="password",X=200,Z=400,ee="1",te="3",re="4",ne="2",oe="4",ie="5",ae="0",se="1",ce="2",le="3",de="4",he={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},ue="unexpected_error",ge="post_request_failed";var pe=Object.freeze({__proto__:null,postRequestFailed:ge,unexpectedError:ue});
/*! @azure/msal-common v15.2.0 2025-03-04 */const me={[ue]:"Unexpected error in authentication.",[ge]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."},fe={unexpectedError:{code:ue,desc:me[ue]},postRequestFailed:{code:ge,desc:me[ge]}};class Ce extends Error{constructor(e,r,n){super(r?`${e}: ${r}`:e),Object.setPrototypeOf(this,Ce.prototype),this.errorCode=e||t.EMPTY_STRING,this.errorMessage=r||t.EMPTY_STRING,this.subError=n||t.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function ye(e,t){return new Ce(e,t?`${me[e]} ${t}`:me[e])}
/*! @azure/msal-common v15.2.0 2025-03-04 */const ve="client_info_decoding_error",Ie="client_info_empty_error",Te="token_parsing_error",we="null_or_empty_token",Ae="endpoints_resolution_error",ke="network_error",Se="openid_config_error",be="hash_not_deserialized",Ee="invalid_state",Re="state_mismatch",_e="state_not_found",Pe="nonce_mismatch",Me="auth_time_not_found",Ne="max_age_transpired",Oe="multiple_matching_tokens",qe="multiple_matching_accounts",Ue="multiple_matching_appMetadata",Le="request_cannot_be_made",He="cannot_remove_empty_scope",xe="cannot_append_scopeset",Be="empty_input_scopeset",De="device_code_polling_cancelled",Fe="device_code_expired",Ke="device_code_unknown_error",ze="no_account_in_silent_request",Ge="invalid_cache_record",$e="invalid_cache_environment",Qe="no_account_found",We="no_crypto_object",je="unexpected_credential_type",Ve="invalid_assertion",Ye="invalid_client_credential",Je="token_refresh_required",Xe="user_timeout_reached",Ze="token_claims_cnf_required_for_signedjwt",et="authorization_code_missing_from_server_response",tt="binding_key_not_removed",rt="end_session_endpoint_not_supported",nt="key_id_missing",ot="no_network_connectivity",it="user_canceled",at="missing_tenant_id_error",st="method_not_implemented",ct="nested_app_auth_bridge_disabled";var lt=Object.freeze({__proto__:null,authTimeNotFound:Me,authorizationCodeMissingFromServerResponse:et,bindingKeyNotRemoved:tt,cannotAppendScopeSet:xe,cannotRemoveEmptyScope:He,clientInfoDecodingError:ve,clientInfoEmptyError:Ie,deviceCodeExpired:Fe,deviceCodePollingCancelled:De,deviceCodeUnknownError:Ke,emptyInputScopeSet:Be,endSessionEndpointNotSupported:rt,endpointResolutionError:Ae,hashNotDeserialized:be,invalidAssertion:Ve,invalidCacheEnvironment:$e,invalidCacheRecord:Ge,invalidClientCredential:Ye,invalidState:Ee,keyIdMissing:nt,maxAgeTranspired:Ne,methodNotImplemented:st,missingTenantIdError:at,multipleMatchingAccounts:qe,multipleMatchingAppMetadata:Ue,multipleMatchingTokens:Oe,nestedAppAuthBridgeDisabled:ct,networkError:ke,noAccountFound:Qe,noAccountInSilentRequest:ze,noCryptoObject:We,noNetworkConnectivity:ot,nonceMismatch:Pe,nullOrEmptyToken:we,openIdConfigError:Se,requestCannotBeMade:Le,stateMismatch:Re,stateNotFound:_e,tokenClaimsCnfRequiredForSignedJwt:Ze,tokenParsingError:Te,tokenRefreshRequired:Je,unexpectedCredentialType:je,userCanceled:it,userTimeoutReached:Xe});
/*! @azure/msal-common v15.2.0 2025-03-04 */const dt={[ve]:"The client info could not be parsed/decoded correctly",[Ie]:"The client info was empty",[Te]:"Token cannot be parsed",[we]:"The token is null or empty",[Ae]:"Endpoints cannot be resolved",[ke]:"Network request failed",[Se]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[be]:"The hash parameters could not be deserialized",[Ee]:"State was not the expected format",[Re]:"State mismatch error",[_e]:"State not found",[Pe]:"Nonce mismatch error",[Me]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Ne]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Oe]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[qe]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Ue]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[Le]:"Token request cannot be made without authorization code or refresh token.",[He]:"Cannot remove null or empty scope from ScopeSet",[xe]:"Cannot append ScopeSet",[Be]:"Empty input ScopeSet cannot be processed",[De]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[Fe]:"Device code is expired.",[Ke]:"Device code stopped polling for unknown reasons.",[ze]:"Please pass an account object, silent flow is not supported without account information",[Ge]:"Cache record object was null or undefined.",[$e]:"Invalid environment when attempting to create cache entry",[Qe]:"No account found in cache for given key.",[We]:"No crypto object detected.",[je]:"Unexpected credential type.",[Ve]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[Ye]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Je]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[Xe]:"User defined timeout for device code polling reached",[Ze]:"Cannot generate a POP jwt if the token_claims are not populated",[et]:"Server response does not contain an authorization code to proceed",[tt]:"Could not remove the credential's binding key from storage.",[rt]:"The provided authority does not support logout",[nt]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[ot]:"No network connectivity. Check your internet connection.",[it]:"User cancelled the flow.",[at]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[st]:"This method has not been implemented",[ct]:"The nested app auth bridge is disabled"},ht={clientInfoDecodingError:{code:ve,desc:dt[ve]},clientInfoEmptyError:{code:Ie,desc:dt[Ie]},tokenParsingError:{code:Te,desc:dt[Te]},nullOrEmptyToken:{code:we,desc:dt[we]},endpointResolutionError:{code:Ae,desc:dt[Ae]},networkError:{code:ke,desc:dt[ke]},unableToGetOpenidConfigError:{code:Se,desc:dt[Se]},hashNotDeserialized:{code:be,desc:dt[be]},invalidStateError:{code:Ee,desc:dt[Ee]},stateMismatchError:{code:Re,desc:dt[Re]},stateNotFoundError:{code:_e,desc:dt[_e]},nonceMismatchError:{code:Pe,desc:dt[Pe]},authTimeNotFoundError:{code:Me,desc:dt[Me]},maxAgeTranspired:{code:Ne,desc:dt[Ne]},multipleMatchingTokens:{code:Oe,desc:dt[Oe]},multipleMatchingAccounts:{code:qe,desc:dt[qe]},multipleMatchingAppMetadata:{code:Ue,desc:dt[Ue]},tokenRequestCannotBeMade:{code:Le,desc:dt[Le]},removeEmptyScopeError:{code:He,desc:dt[He]},appendScopeSetError:{code:xe,desc:dt[xe]},emptyInputScopeSetError:{code:Be,desc:dt[Be]},DeviceCodePollingCancelled:{code:De,desc:dt[De]},DeviceCodeExpired:{code:Fe,desc:dt[Fe]},DeviceCodeUnknownError:{code:Ke,desc:dt[Ke]},NoAccountInSilentRequest:{code:ze,desc:dt[ze]},invalidCacheRecord:{code:Ge,desc:dt[Ge]},invalidCacheEnvironment:{code:$e,desc:dt[$e]},noAccountFound:{code:Qe,desc:dt[Qe]},noCryptoObj:{code:We,desc:dt[We]},unexpectedCredentialType:{code:je,desc:dt[je]},invalidAssertion:{code:Ve,desc:dt[Ve]},invalidClientCredential:{code:Ye,desc:dt[Ye]},tokenRefreshRequired:{code:Je,desc:dt[Je]},userTimeoutReached:{code:Xe,desc:dt[Xe]},tokenClaimsRequired:{code:Ze,desc:dt[Ze]},noAuthorizationCodeFromServer:{code:et,desc:dt[et]},bindingKeyNotRemovedError:{code:tt,desc:dt[tt]},logoutNotSupported:{code:rt,desLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */const pt={createNewGuid:()=>{throw gt(st)},base64Decode:()=>{throw gt(st)},base64Encode:()=>{throw gt(st)},base64UrlEncode:()=>{throw gt(st)},encodeKid:()=>{throw gt(st)},async getPublicKeyThumbprint(){throw gt(st)},async removeTokenBindingKey(){throw gt(st)},async clearKeystore(){throw gt(st)},async signJwt(){throw gt(st)},async hashString(){throw gt(st)}};
/*! @azure/msal-common v15.2.0 2025-03-04 */var mt;e.LogLevel=void 0,(mt=e.LogLevel||(e.LogLevel={}))[mt.Error=0]="Error",mt[mt.Warning=1]="Warning",mt[mt.Info=2]="Info",mt[mt.Verbose=3]="Verbose",mt[mt.Trace=4]="Trace";class ft{constructor(r,n,o){this.level=e.LogLevel.Info;const i=r||ft.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||(()=>{}),this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level="number"==typeof i.logLevel?i.logLevel:e.LogLevel.Info,this.correlationId=i.correlationId||t.EMPTY_STRING,this.packageName=n||t.EMPTY_STRING,this.packageVersion=o||t.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:e.LogLevel.Info}}clone(e,t,r){return new ft({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(t,r){if(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)return;const n=`${`[${(new Date).toUTCString()}] : [${r.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${e.LogLevel[r.logLevel]} - ${t}`;this.executeCallback(r.logLevel,n,r.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(r,n){this.logMessage(r,{logLevel:e.LogLevel.Error,containsPii:!1,correlationId:n||t.EMPTY_STRING})}errorPii(r,n){this.logMessage(r,{logLevel:e.LogLevel.Error,containsPii:!0,correlationId:n||t.EMPTY_STRING})}warning(r,n){this.logMessage(r,{logLevel:e.LogLevel.Warning,containsPii:!1,correlationId:n||t.EMPTY_STRING})}warningPii(r,n){this.logMessage(r,{logLevel:e.LogLevel.Warning,containsPii:!0,correlationId:n||t.EMPTY_STRING})}info(r,n){this.logMessage(r,{logLevel:e.LogLevel.Info,containsPii:!1,correlationId:n||t.EMPTY_STRING})}infoPii(r,n){this.logMessage(r,{logLevel:e.LogLevel.Info,containsPii:!0,correlationId:n||t.EMPTY_STRING})}verbose(r,n){this.logMessage(r,{logLevel:e.LogLevel.Verbose,containsPii:!1,correlationId:n||t.EMPTY_STRING})}verbosePii(r,n){this.logMessage(r,{logLevel:e.LogLevel.Verbose,containsPii:!0,correlationId:n||t.EMPTY_STRING})}trace(r,n){this.logMessage(r,{logLevel:e.LogLevel.Trace,containsPii:!1,correlationId:n||t.EMPTY_STRING})}tracePii(r,n){this.logMessage(r,{logLevel:e.LogLevel.Trace,containsPii:!0,correlationId:n||t.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}
/*! @azure/msal-common v15.2.0 2025-03-04 */const Ct="@azure/msal-common",yt="15.2.0",vt={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};
/*! @azure/msal-common v15.2.0 2025-03-04 */
function It(e,t){const r=function(e){if(!e)throw gt(we);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw gt(Te);return t[2]}(e);try{const e=t(r);return JSON.parse(e)}catch(e){throw gt(Te)}}function Tt(e,t){if(0===t||Date.now()-3e5>e+t)throw gt(Ne)}
/*! @azure/msal-common v15.2.0 2025-03-04 */function wt(){return Math.round((new Date).getTime()/1e3)}function At(e,t){const r=Number(e)||0;return wt()+t>r}function kt(e){return Number(e)>wt()}
/*! @azure/msal-common v15.2.0 2025-03-04 */function St(e){return[Pt(e),Mt(e),Nt(e),Ot(e),qt(e)].join(M).toLowerCase()}function bt(e,t,r,n,o){return{credentialType:O.ID_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:r,realm:o}}function Et(e,t,r,n,o,i,a,s,c,l,d,h,u,g,p){const m={homeAccountId:e,credentialType:O.ACCESS_TOKEN,secret:r,cachedAt:wt().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:n,realm:o,target:i,tokenType:d||z.BEARER};if(h&&(m.userAssertionHash=h),l&&(m.refreshOn=l.toString()),g&&(m.requestedClaims=g,m.requestedClaimsHash=p),m.tokenType?.toLowerCase()!==z.BEARER.toLowerCase())switch(m.credentialType=O.ACCESS_TOKEN_WITH_AUTH_SCHEME,m.tokenType){case z.POP:const e=It(r,c);if(!e?.cnf?.kid)throw gt(Ze);m.keyId=e.cnf.kid;break;case z.SSH:m.keyId=u}return m}function Rt(e,t,r,n,o,i,a){const s={credentialType:O.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:r};return i&&(s.userAssertionHash=i),o&&(s.familyId=o),a&&(s.expiresOn=a.toString()),s}function _t(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function Pt(e){return[e.homeAccountId,e.environment].join(M).toLowerCase()}function Mt(e){const t=e.credentialType===O.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||""].join(M).toLowerCase()}function Nt(e){return(e.target||"").toLowerCase()}function Ot(e){return(e.requestedClaimsHash||"").toLowerCase()}function qt(e){return e.tokenType&&e.tokenType.toLowerCase()!==z.BEARER.toLowerCase()?e.tokenType.toLowerCase():""}function Ut(){return wt()+H}function Lt(e,t,r){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=r,e.jwks_uri=t.jwks_uri}function Ht(e,t,r){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=r}function xt(e){return e.expiresAt<=wt()}
/*! @azure/msal-common v15.2.0 2025-03-04 */const Bt="redirect_uri_empty",Dt="claims_request_parsing_error",Ft="authority_uri_insecure",Kt="url_parse_error",zt="empty_url_error",Gt="empty_input_scopes_error",$t="invalid_prompt_value",Qt="invalid_claims",Wt="token_request_empty",jt="logout_request_empty",Vt="invalid_code_challenge_method",Yt="pkce_params_missing",Jt="invalid_cloud_discovery_metadata",Xt="invalid_authority_metadata",Zt="untrusted_authority",er="missing_ssh_jwk",tr="missing_ssh_kid",rr="missing_nonce_authentication_header",nr="invalid_authentication_header",or="cannot_set_OIDCOptions",ir="cannot_allow_platform_broker",ar="authority_mismatch";var sr=Object.freeze({__proto__:null,authorityMismatch:ar,authorityUriInsecure:Ft,cannotAllowPlatformBroker:ir,cannotSetOIDCOptions:or,claimsRequestParsingError:Dt,emptyInputScopesError:Gt,invalidAuthenticationHeader:nr,invalidAuthorityMetadata:Xt,invalidClaims:Qt,invalidCloudDiscoveryMetadata:Jt,invalidCodeChallengeMethod:Vt,invalidPromptValue:$t,logoutRequestEmpty:jt,missingNonceAuthenticationHeader:rr,missingSshJwk:er,missingSshKid:tr,pkceParamsMissing:Yt,redirectUriEmpty:Bt,tokenRequestEmpty:Wt,untrustedAuthority:Zt,urlEmptyError:zt,urlParseError:Kt});
/*! @azure/msal-common v15.2.0 2025-03-04 */const cr={[Bt]:"A redirect URI is required for all calls, and none has been set.",[Dt]:"Could not parse the given claims request object.",[Ft]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Kt]:"URL could not be parsed into appropriate segments.",[zt]:"URL was empty or null.",[Gt]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[$t]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[Qt]:"Given claims parameter must be a stringified JSON object.",[Wt]:"Token request was empty and not found in cache.",[jt]:"The logout request was null or undefined.",[Vt]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Yt]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Jt]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Xt]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Zt]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[er]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[tr]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[rr]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[nr]:"Invalid authentication header provided",[or]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[ir]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[ar]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."},lr={redirectUriNotSet:{code:Bt,desc:cr[Bt]},claimsRequestParsingError:{code:Dt,desc:cr[Dt]},authorityUriInsecure:{code:Ft,desc:cr[Ft]},urlParseError:{code:Kt,desc:cr[Kt]},urlEmptyError:{code:zt,desc:cr[zt]},emptyScopesError:{code:Gt,desc:cr[Gt]},invalidPrompt:{code:$t,desc:cr[$t]},invalidClaimsRequest:{code:Qt,desc:cr[Qt]},tokenRequestEmptyError:{code:Wt,desc:cr[Wt]},logoutRequestEmptyError:{code:jt,desc:cr[jt]},invalidCodeChallengeMethod:{code:Vt,desc:cr[Vt]},invalidCodeChallengeParams:{code:Yt,desc:cr[Yt]},invalidCloudDiscoveryMetadata:{code:Jt,desc:cr[Jt]},invalidAuthorityMetadata:{code:Xt,desc:cr[Xt]},untrustedAuthority:{code:Zt,desc:cr[Zt]},missingSshJwk:{code:er,desc:cr[er]},missingSshKid:{code:tr,desc:cr[tr]},missingNonceAuthenticationHeader:{code:rr,desc:cr[rr]},invalidAuthenticationHeader:{code:nr,desc:cr[nr]},cannotSetOIDCOptions:{code:or,desc:cr[or]},cannotAllowPlatformBroker:{code:ir,desc:cr[ir]},authorityMismatch:{code:ar,desc:cr[ar]}};class dr extends Ce{constructor(e){super(e,cr[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,dr.prototype)}}function hr(e){return new dr(e)}
/*! @azure/msal-common v15.2.0 2025-03-04 */class ur{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split("&"),n=e=>decodeURIComponent(e.replace(/\+/g," "));return r.forEach((e=>{if(e.trim()){const[r,o]=e.split(/=(.+)/g,2);r&&o&&(t[n(r)]=n(o))}})),t}static trimArrayEntries(e){return e.map((e=>e.trim()))}static removeEmptyStringsFromArray(e){return e.filter((e=>!!e))}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class gr{constructor(e){const t=e?ur.trimArrayEntries([...e]):[],r=t?ur.removeEmptyStringsFromArray(t):[];if(!r||!r.length)throw hr(Gt);this.scopes=new Set,r.forEach((e=>this.scopes.add(e)))}static fromString(e){const r=(e||t.EMPTY_STRING).split(" ");return new gr(r)}static createSearchScopes(e){const r=new gr(e);return r.containsOnlyOIDCScopes()?r.removeScope(t.OFFLINE_ACCESS_SCOPE):r.removeOIDCScopes(),r}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new gr(t);return!!e&&r.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&(this.scopes.size>=e.scopes.size&&e.asArray().every((e=>this.containsScope(e))))}containsOnlyOIDCScopes(){let e=0;return s.forEach((t=>{this.containsScope(t)&&(e+=1)})),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach((e=>this.appendScope(e)))}catch(e){throw gt(xe)}}removeScope(e){if(!e)throw gt(He);this.scopes.delete(e.trim())}removeOIDCScopes(){s.forEach((e=>{this.scopes.delete(e)}))}unionScopeSets(e){if(!e)throw gt(Be);const t=new Set;return e.scopes.forEach((e=>t.add(e.toLowerCase()))),this.scopes.forEach((e=>t.add(e.toLowerCase()))),t}intersectingScopeSets(e){if(!e)throw gt(Be);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),n=this.getScopeCount();return t.size<n+r}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach((t=>e.push(t))),e}printScopes(){if(this.scopes){return this.asArray().join(" ")}return t.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}
/*! @azure/msal-common v15.2.0 2025-03-04 */function pr(e,t){if(!e)throw gt(Ie);try{const r=t(e);return JSON.parse(r)}catch(e){throw gt(ve)}}function mr(e){if(!e)throw gt(ve);const r=e.split(N,2);return{uid:r[0],utid:r.length<2?t.EMPTY_STRING:r[1]}}
/*! @azure/msal-common v15.2.0 2025-03-04 */function fr(e,t){return!!e&&!!t&&e===t.split(".")[1]}function Cr(e,t,r,n){if(n){const{oid:t,sub:r,tid:o,name:i,tfp:a,acr:s}=n,c=o||a||s||"";return{tenantId:c,localAccountId:t||r||"",name:i,isHomeTenant:fr(c,e)}}return{tenantId:r,localAccountId:t,isHomeTenant:fr(r,e)}}function yr(e,t,r,n){let o=e;if(t){const{isHomeTenant:r,...n}=t;o={...e,...n}}if(r){const{isHomeTenant:t,...i}=Cr(e.homeAccountId,e.localAccountId,e.tenantId,r);return o={...o,...i,idTokenClaims:r,idToken:n},o}return o}
/*! @azure/msal-common v15.2.0 2025-03-04 */const vr=0,Ir=1,Tr=2,wr=3;
/*! @azure/msal-common v15.2.0 2025-03-04 */function Ar(e){if(e){return e.tid||e.tfp||e.acr||null}return null}
/*! @azure/msal-common v15.2.0 2025-03-04 */const kr={AAD:"AAD",OIDC:"OIDC"};
/*! @azure/msal-common v15.2.0 2025-03-04 */class Sr{generateAccountId(){return[this.homeAccountId,this.environment].join(M).toLowerCase()}generateAccountKey(){return Sr.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map((e=>[e.tenantId,e])))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(M).toLowerCase()}static createAccount(e,t,r){const n=new Sr;let o;t.authorityType===Ir?n.authorityType=_:t.protocolMode===kr.AAD?n.authorityType=R:n.authorityType=P,e.clientInfo&&r&&(o=pr(e.clientInfo,r)),n.clientInfo=e.clientInfo,n.homeAccountId=e.homeAccountId,n.nativeAccountId=e.nativeAccountId;const i=e.environment||t&&t.getPreferredCache();if(!i)throw gt($e);n.environment=i,n.realm=o?.utid||Ar(e.idTokenClaims)||"",n.localAccountId=o?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const a=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,s=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(n.username=a||s||"",n.name=e.idTokenClaims?.name||"",n.cloudGraphHostName=e.cloudGraphHostName,n.msGraphHost=e.msGraphHost,e.tenantProfiles)n.tenantProfiles=e.tenantProfiles;else{const t=Cr(e.homeAccountId,n.localAccountId,n.realm,e.idTokenClaims);n.tenantProfiles=[t]}return n}static createFromAccountInfo(e,t,r){const n=new Sr;return n.authorityType=e.authorityType||P,n.homeAccountId=e.homeAccountId,n.localAccountId=e.localAccountId,n.nativeAccountId=e.nativeAccountId,n.realm=e.tenantId,n.environment=e.environment,n.username=e.username,n.name=e.name,n.cloudGraphHostName=t,n.msGraphHost=r,n.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),n}static generateHomeAccountId(e,t,r,n,o){if(t!==Ir&&t!==Tr){if(e)try{const t=pr(e,n.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}r.warning("No client info in response")}return o?.sub||""}static isAccountEntity(e){return!!e&&(e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"))}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let n=!0;if(r){const r=e.idTokenClaims||{},o=t.idTokenClaims||{};n=r.iat===o.iat&&r.nonce===o.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&n}}
/*! @azure/msal-common v15.2.0 2025-03-04 */function br(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function Er(e){if(!e||e.indexOf("=")<0)return null;try{const t=br(e),r=Object.fromEntries(new URLSearchParams(t));if(r.code||r.error||r.error_description||r.state)return r}catch(e){throw gt(be)}return null}
/*! @azure/msal-common v15.2.0 2025-03-04 */class Rr{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw hr(zt);e.includes("#")||(this._urlString=Rr.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return ur.endsWith(t,"?")?t=t.slice(0,-1):ur.endsWith(t,"?/")&&(t=t.slice(0,-2)),ur.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw hr(Kt)}if(!e.HostNameAndPort||!e.PathSegments)throw hr(Kt);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw hr(Ft)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return Rr.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return!e||0===r.length||r[0]!==C&&r[0]!==y||(r[0]=e),Rr.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw hr(Kt);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let n=r.AbsolutePath.split("/");return n=n.filter((e=>e&&e.length>0)),r.PathSegments=n,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw hr(Kt);return r[2]}static getAbsoluteUrl(e,r){if(e[0]===t.FORWARD_SLASH){const t=new Rr(r).getUrlComponents();return t.Protocol+"//"+t.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new Rr(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!Er(e)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */const _r={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},Pr={tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},Mr=new Set;function Nr(e,t,r,n){if(n?.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){const o=Or(t,e);if(o)return n?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),o.aliases;n?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}function Or(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.aliases.includes(t))return n}return null}
/*! @azure/msal-common v15.2.0 2025-03-04 */Pr.metadata.forEach((e=>{e.aliases.forEach((e=>{Mr.add(e)}))}));const qr="cache_quota_exceeded",Ur="cache_error_unknown",Lr={[qr]:"Exceeded cache storage capacity.",[Ur]:"Unexpected error occurred when using cache storage."};class Hr extends Error{constructor(e,t){const r=t||(Lr[e]?Lr[e]:Lr[Ur]);super(`${e}: ${r}`),Object.setPrototypeOf(this,Hr.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class xr{constructor(e,t,r,n){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(Ct,yt),this.staticAuthorityOptions=n}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);if(t.length>1){return t.sort((e=>e.idTokenClaims?-1:1))[0]}return 1===t.length?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap((e=>this.getTenantProfilesFromAccountEntity(e,t?.tenantId,t)))}getTenantedAccountInfoByFilter(e,t,r,n){let o,i=null;if(n&&!this.tenantProfileMatchesFilter(r,n))return null;const a=this.getIdToken(e,t,r.tenantId);return a&&(o=It(a.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(o,n))?null:(i=yr(e,r,o,a?.secret),i)}getTenantProfilesFromAccountEntity(e,t,r){const n=e.getAccountInfo();let o=n.tenantProfiles||new Map;const i=this.getTokenKeys();if(t){const e=o.get(t);if(!e)return[];o=new Map([[t,e]])}const a=[];return o.forEach((e=>{const t=this.getTenantedAccountInfoByFilter(n,i,e,r);t&&a.push(t)})),a}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId))&&((!t.name||e.name===t.name)&&(void 0===t.isHomeTenant||e.isHomeTenant===t.isHomeTenant))}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,r){if(!e)throw gt(Ge);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==r?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==r?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==r?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Error?(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e.message}`,t),"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?(this.commonLogger?.error("CacheManager.saveCacheRecord: exceeded storage quota",t),new Hr(qr)):new Hr(e.name,e.message)):(this.commonLogger?.errorPii(`CacheManager.saveCacheRecord: ${e}`,t),new Hr(Ur))}}async saveAccessToken(e,t){const r={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),o=gr.fromString(e.target),i=[];n.accessToken.forEach((e=>{if(!this.accessTokenKeyMatchesFilter(e,r,!1))return;const t=this.getAccessTokenCredential(e);if(t&&this.credentialMatchesFilter(t,r)){gr.fromString(t.target).intersectingScopeSets(o)&&i.push(this.removeAccessToken(e))}})),await Promise.all(i),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),r=[];return t.forEach((t=>{if(!this.isAccountKey(t,e.homeAccountId))return;const n=this.getAccount(t,this.commonLogger);if(!n)return;if(e.homeAccountId&&!this.matchHomeAccountId(n,e.homeAccountId))return;if(e.username&&!this.matchUsername(n.username,e.username))return;if(e.environment&&!this.matchEnvironment(n,e.environment))return;if(e.realm&&!this.matchRealm(n,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(n,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(n,e.authorityType))return;const o={localAccountId:e?.localAccountId,name:e?.name},i=n.tenantProfiles?.filter((e=>this.tenantProfileMatchesFilter(e,o)));i&&0===i.length||r.push(n)})),r}isAccountKey(e,t,r){return!(e.split(M).length<3)&&(!(t&&!e.toLowerCase().includes(t.toLowerCase()))&&!(r&&!e.toLowerCase().includes(r.toLowerCase())))}isCredentialKey(e){if(e.split(M).length<6)return!1;const t=e.toLowerCase();if(-1===t.indexOf(O.ID_TOKEN.toLowerCase())&&-1===t.indexOf(O.ACCESS_TOKEN.toLowerCase())&&-1===t.indexOf(O.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())&&-1===t.indexOf(O.REFRESH_TOKEN.toLowerCase()))return!1;if(t.indexOf(O.REFRESH_TOKEN.toLowerCase())>-1){const e=`${O.REFRESH_TOKEN}${M}${this.clientId}${M}`,r=`${O.REFRESH_TOKEN}${M}${U}${M}`;if(-1===t.indexOf(e.toLowerCase())&&-1===t.indexOf(r.toLowerCase()))return!1}else if(-1===t.indexOf(this.clientId.toLowerCase()))return!1;return!0}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.enviroLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */const Dr={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},Fr={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:e.LogLevel.Info,correlationId:t.EMPTY_STRING},Kr={claimsBasedCachingEnabled:!1},zr={async sendGetRequestAsync(){throw gt(st)},async sendPostRequestAsync(){throw gt(st)}},Gr={sku:t.SKU,version:yt,cpu:t.EMPTY_STRING,os:t.EMPTY_STRING},$r={clientSecret:t.EMPTY_STRING,clientAssertion:void 0},Qr={azureCloudInstance:vt.None,tenant:`${t.DEFAULT_COMMON_TENANT}`},Wr={application:{appName:"",appVersion:""}};function jr(e){return e.authOptions.authority.options.protocolMode===kr.OIDC}
/*! @azure/msal-common v15.2.0 2025-03-04 */const Vr="home_account_id",Yr="UPN",Jr="client_id",Xr="redirect_uri",Zr="response_type",en="token_type",tn="req_cnf",rn="return_spa_code",nn="x-client-xtra-sku",on="brk_client_id",an="brk_redirect_uri";
/*! @azure/msal-common v15.2.0 2025-03-04 */
/*! @azure/msal-common v15.2.0 2025-03-04 */
class sn{static validateRedirectUri(e){if(!e)throw hr(Bt)}static validatePrompt(e){const t=[];for(const e in w)t.push(w[e]);if(t.indexOf(e)<0)throw hr($t)}static validateClaims(e){try{JSON.parse(e)}catch(e){throw hr(Qt)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw hr(Yt);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([A.PLAIN,A.S256].indexOf(e)<0)throw hr(Vt)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class cn{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(Zr,encodeURIComponent(t.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(Zr,encodeURIComponent(`${t.TOKEN_RESPONSE_TYPE} ${t.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set("response_mode",encodeURIComponent(e||S.QUERY))}addNativeBroker(){this.parameters.set("nativebroker",encodeURIComponent("1"))}addScopes(e,t=!0,r=a){!t||r.includes("openid")||e.includes("openid")||r.push("openid");const n=t?[...e||[],...r]:e||[],o=new gr(n);this.parameters.set("scope",encodeURIComponent(o.printScopes()))}addClientId(e){this.parameters.set(Jr,encodeURIComponent(e))}addRedirectUri(e){sn.validateRedirectUri(e),this.parameters.set(Xr,encodeURIComponent(e))}addPostLogoutRedirectUri(e){sn.validateRedirectUri(e),this.parameters.set("post_logout_redirect_uri",encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set("id_token_hint",encodeURIComponent(e))}addDomainHint(e){this.parameters.set("domain_hint",encodeURIComponent(e))}addLoginHint(e){this.parameters.set("login_hint",encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(h,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(h,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set("sid",encodeURIComponent(e))}addClaims(e,t){const r=this.addClientCapabilitiesToClaims(e,t);sn.validateClaims(r),this.parameters.set("claims",encodeURIComponent(r))}addCorrelationId(e){this.parameters.set("client-request-id",encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set("x-client-SKU",e.sku),this.parameters.set("x-client-VER",e.version),e.os&&this.parameters.set("x-client-OS",e.os),e.cpu&&this.parameters.set("x-client-CPU",e.cpu)}addApplicationTelemetry(e){e?.appName&&this.parameters.set("x-app-name",e.appName),e?.appVersion&&this.parameters.set("x-app-ver",e.appVersion)}addPrompt(e){sn.validatePrompt(e),this.parameters.set("prompt",encodeURIComponent(e))}addState(e){e&&this.parameters.set("state",encodeURIComponent(e))}addNonce(e){this.parameters.set("nonce",encodeURIComponent(e))}addCodeChallengeParams(e,t){if(sn.validateCodeChallengeParams(e,t),!e||!t)throw hr(Yt);this.parameters.set("code_challenge",encodeURIComponent(e)),this.parameters.set("code_challenge_method",encodeURIComponent(t))}addAuthorizationCode(e){this.parameters.set("code",encodeURIComponent(e))}addDeviceCode(e){this.parameters.set("device_code",encodeURIComponent(e))}addRefreshToken(e){this.parameters.set("refresh_token",encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set("code_verifier",encodeURIComponent(e))}addClientSecret(e){this.parameters.set("client_secret",encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set("client_assertion",encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set("client_assertion_type",encodeURIComponent(e))}addOboAssertion(e){this.parameters.set("assertion",encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set("requested_token_use",encodeURIComponent(e))}addGrantType(e){this.parameters.set("grant_type",encodeURIComponent(e))}addClientInfo(){this.parameters.set("client_info","1")}addExtraQueryParameters(e){Object.entries(e).forEach((([e,t])=>{!this.parameters.has(e)&&t&&this.parameters.set(e,t)}))}addClientCapabilitiesToClaims(e,t){let r;if(e)try{r=JSON.parse(e)}catch(e){throw hr(Qt)}else r={};return t&&t.length>0&&(r.hasOwnProperty(I)||(r[I]={}),r[I][T]={values:t}),JSON.stringify(r)}addUsername(e){this.parameters.set(Y,encodeURIComponent(e))}addPassword(e){this.parameters.set(J,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(en,z.POP),this.parameters.set(tn,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(en,z.SSH),this.parameters.set(tn,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set("x-client-current-telemetry",e.generateCurrentRequestHeaderValue()),this.parameters.set("x-client-last-telemetry",e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set("x-ms-lib-capability",W)}addLogoutHint(e){this.parameters.set("logout_hint",encodeURIComponent(e))}addBrokerParameters(e){const t={};t[on]=e.brokerClientId,t[an]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach(((t,r)=>{e.push(`${r}=${t}`)})),function(e,t,r){if(!t)return;const n=e.get(Jr);n&&e.has(on)&&r?.addFields({embeddedClientId:n,embeddedRedirectUri:e.get(Xr)},t)}(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}
/*! @azure/msal-common v15.2.0 2025-03-04 */
/*! @azure/msal-common v15.2.0 2025-03-04 */
const ln={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",InitializeCache:"initializeCache",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHaLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */
class fn{constructor(e,t,r,n){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=n}async detectRegion(e,r){this.performanceClient?.addQueueMeasurement(ln.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)r.region_source=te;else{const e=fn.IMDS_OPTIONS;try{const o=await mn(this.getRegionFromIMDS.bind(this),ln.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(t.IMDS_VERSION,e);if(o.status===X&&(n=o.body,r.region_source=re),o.status===Z){const t=await mn(this.getCurrentVersion.bind(this),ln.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(e);if(!t)return r.region_source=ee,null;const o=await mn(this.getRegionFromIMDS.bind(this),ln.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(t,e);o.status===X&&(n=o.body,r.region_source=re)}}catch(e){return r.region_source=ee,null}}return n||(r.region_source=ee),n||null}async getRegionFromIMDS(e,r){return this.performanceClient?.addQueueMeasurement(ln.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${t.IMDS_ENDPOINT}?api-version=${e}&format=text`,r,t.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(ln.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const r=await this.networkInterface.sendGetRequestAsync(`${t.IMDS_ENDPOINT}?format=json`,e);return r.status===Z&&r.body&&r.body["newest-versions"]&&r.body["newest-versions"].length>0?r.body["newest-versions"][0]:null}catch(e){return null}}}fn.IMDS_OPTIONS={headers:{Metadata:"true"}};
/*! @azure/msal-common v15.2.0 2025-03-04 */
class Cn{constructor(e,t,r,n,o,i,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=n,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=o,this.performanceClient=a,this.correlationId=i,this.managedIdentity=s||!1,this.regionDiscovery=new fn(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(t.CIAM_AUTH_URL))return wr;const r=e.PathSegments;if(r.length)switch(r[0].toLowerCase()){case t.ADFS:return Ir;case t.DSTS:return Tr}return vr}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new Rr(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw gt(Ae)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw gt(Ae)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw gt(Ae)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw gt(rt);return this.replacePath(this.metadata.end_session_endpoint)}throw gt(Ae)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw gt(Ae)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw gt(Ae)}canReplaceTenant(e){return 1===e.PathSegments.length&&!Cn.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===vr&&this.protocolMode===kr.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const r=new Rr(this.metadata.canonical_authority).getUrlComponents(),n=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach(((e,o)=>{let i=n[o];if(0===o&&this.canReplaceTenant(r)){const e=new Rr(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];i!==e&&(this.logger.verbose(`Replacing tenant domain name ${i} with id ${e}`),i=e)}e!==i&&(t=t.replace(`/${i}/`,`/${e}/`))})),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Ir||this.protocolMode!==kr.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(ln.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await mn(this.updateCloudDiscoveryMetadata.bind(this),ln.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await mn(this.updateEndpointMetadata.bind(this),ln.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:Ut(),jwks_uri:""}),e}updateCachedMetadata(e,t,r){t!==B&&r?.source!==B&&(e.expiresAt=Ut(),e.canonical_authority=this.canonicalAuthority);const n=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(n,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(ln.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===F&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata){Lt(e,await mn(this.updateMetadataWithRegionalInformation.biLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */(r.body);return n?r.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in _r?_r[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(ln.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const r=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(r){if(r!==t.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=ne,this.regionDiscoveryMetadata.region_used=r,Cn.replaceWithRegionalInformation(e,r);const n=await mn(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),ln.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(n)return this.regionDiscoveryMetadata.region_outcome=oe,this.regionDiscoveryMetadata.region_used=n,Cn.replaceWithRegionalInformation(e,n);this.regionDiscoveryMetadata.region_outcome=ie}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(ln.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await mn(this.getCloudDiscoveryMetadataFromNetwork.bind(this),ln.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(r)return Ht(e,r,!0),D;throw hr(Zt)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||t.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||t.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||t.NOT_APPLICABLE}`);const r=this.getCloudDiscoveryMetadataFromConfig();if(r)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Ht(e,r,!1),x;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(n=this.hostnameAndPort,Or(Pr.metadata,n));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Ht(e,t,!1),F;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var n;const o=xt(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),B):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===wr)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Cn.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=Or(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),hr(Jt)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Cn.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(ln.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${t.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,r={};let n=null;try{const o=await this.networkInterface.sendGetRequestAsync(e,r);let i,a;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}
/*! @azure/msal-common v15.2.0 2025-03-04 */(o.body))i=o.body,a=i.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${i.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),i=o.body,i.error===t.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${i.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${i.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),a=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=Or(a,this.hostnameAndPort)}catch(e){if(e instanceof Ce)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=Cn.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter((e=>e&&Rr.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort)).length>0}static generateAuthority(e,r){let n;if(r&&r.azureCloudInstance!==vt.None){const e=r.tenant?r.tenant:t.DEFAULT_COMMON_TENANT;n=`${r.azureCloudInstance}/${e}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return t.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw gt(Ae)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Mr.has(e)}static isPublicCloudAuthority(e){return t.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,r,n){const o=new Rr(e);o.validateAsUri();const i=o.getUrlComponents();let a=`${r}.${i.HostNameAndPort}`;this.isPublicCloudAuthority(i.HostNameAndPort)&&(a=`${r}.${t.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const s=Rr.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:a}).urlString;return n?`${s}?${n}`:s}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=Cn.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=Cn.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=Cn.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let r=e;const n=new Rr(e).getUrlComponents();if(0===n.PathSegments.length&&n.HostNameAndPort.endsWith(t.CIAM_AUTH_URL)){r=`${r}${n.HostNameAndPort.split(".")[0]}${t.AAD_TENANT_DOMAIN_SUFFIX}`}return r}}function yn(e){return e.endsWith(t.FORWARD_SLASH)?e:`${e}${t.FORWARD_SLASH}`}function vn(e){const t=e.cloudDiscoveryMetadata;let r;if(t)try{r=JSON.parse(t)}catch(e){throw hr(Jt)}return{canonicalAuthority:e.authority?yn(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:r}}
/*! @azure/msal-common v15.2.0 2025-03-04 */async function In(e,t,r,n,o,i,a){a?.addQueueMeasurement(ln.AuthorityFactoryCreateDiscoveredInstance,i);const s=Cn.transformCIAMAuthority(yn(e)),c=new Cn(s,t,r,n,o,i,a);try{return await mn(c.resolveEndpointsAsync.bind(c),ln.AuthorityResolveEndpointsAsync,o,a,i)(),c}catch(e){throw gt(Ae)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */Cn.reservedTenantDomains=new Set(["{tenant}","{tenantid}",C,v,y]);class Tn extends Ce{constructor(e,t,r,n,o){super(e,t,r),this.name="ServerError",this.errorNo=n,this.status=o,Object.setPrototypeOf(this,Tn.prototype)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class wn{static generateThrottlingStorageKey(e){return`${Q}.${JSON.stringify(e)}`}static preProcess(e,r){const n=wn.generateThrottlingStorageKey(r),o=e.getThrottlingCache(n);if(o){if(o.throttleTime<Date.now())return void e.removeItem(n);throw new Tn(o.errorCodes?.join(" ")||t.EMPTY_STRING,o.errorMessage,o.subError)}}static postProcess(e,t,r){if(wn.checkResponseStatus(r)||wn.checkResponseForRetryAfter(r)){const n={throttleTime:wn.calculateThrottleTime(parseInt(r.headers[d])),error:r.body.error,errorCodes:r.body.error_codes,errorMessage:r.body.error_description,subError:r.body.suberror};e.setThrottlingCache(wn.generateThrottlingStorageKey(t),n)}}static checkResponseStatus(e){return 429===e.status||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&(e.headers.hasOwnProperty(d)&&(e.status<200||e.status>=300))}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(1e3*Math.min(r+(t||G),r+$))}static removeThrottle(e,t,r,n){const o={clientId:t,authority:r.authority,scopes:r.scopes,homeAccountIdentifier:n,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},i=this.generateThrottlingStorageKey(o);e.removeItem(i)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class An extends Ce{constructor(e,t,r){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,An.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=r}}function kn(e,t,r){return new An(e,t,r)}
/*! @azure/msal-common v15.2.0 2025-03-04 */class Sn{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:r,cacheOptions:n,storageInterface:o,networkInterface:i,cryptoInterface:a,clientCredentials:s,libraryInfo:c,telemetry:l,serverTelemetryManager:d,persistencePlugin:h,serializableCache:u}){const g={...Fr,...r};return{authOptions:(p=e,{clientCapabilities:[],azureCloudOptions:Qr,skipAuthorityMetadataCache:!1,instanceAware:!1,...p}),systemOptions:{...Dr,...t},loggerOptions:g,cacheOptions:{...Kr,...n},storageInterface:o||new Br(e.clientId,pt,new ft(g)),networkInterface:i||zr,cryptoInterface:a||pt,clientCredentials:s||$r,libraryInfo:{...Gr,...c},telemetry:{...Wr,...l},serverTelemetryManager:d||null,persistencePlugin:h||null,serializableCache:u||null};var p}(e),this.logger=new ft(this.config.loggerOptions,Ct,yt),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const r={};if(r[c]=t.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case Vr:try{const t=mr(e.credential);r[h]=`Oid:${t.uid}@${t.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Yr:r[h]=`UPN: ${e.credential}`}return r}async executePostToTokenEndpoint(e,t,r,n,o,i){i&&this.performanceClient?.addQueueMeasurement(i,o);const a=await this.sendPostRequest(n,e,{body:t,headers:r},o);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,r,n){let o;wn.preProcess(this.cacheManager,e);try{o=await mn(this.networkClient.sendPostRequestAsync.bind(this.networkClient),ln.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,n)(t,r);const e=o.headers||{};this.performanceClient?.addFields({refreshTokenSize:o.body.refresh_token?.length||0,httpVerToken:e[m]||"",requestId:e[p]||""},n)}catch(e){if(e instanceof An){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[m]||"",requestId:t[p]||"",contentTypeHeader:t[c]||void 0,contentLengthHeader:t[l]||void 0,httpStatus:e.httpStatus},n),e.error}throw e instanceof Ce?e:gt(ke)}return wn.postProcess(this.cacheManager,e,o),o}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(ln.UpdateTokenEndpointAuthority,t);const r=`https://${e}/${this.authority.tenant}/`,n=await In(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=n}createTokenQueryParameters(e){const t=new cn(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}
/*! @azure/msal-common v15.2.0 2025-03-04 */const bn="no_tokens_found",En="native_account_unavailable",Rn="refresh_token_expired",_n="interaction_required",Pn="consent_required",Mn="login_required",Nn="bad_token";var On=Object.freeze({__proto__:null,badToken:Nn,consentRequired:Pn,interactionRequired:_n,loginRequired:Mn,nativeAccountUnavailable:En,noTokensFound:bn,refreshTokenExpired:Rn});
/*! @azure/msal-common v15.2.0 2025-03-04 */const qn=[_n,Pn,Mn,Nn],Un=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Ln={[bn]:"No refresh token found in the cache. Please sign-in.",[En]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[Rn]:"Refresh token has expired.",[Nn]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."},Hn={noTokensFoundError:{code:bn,desc:Ln[bn]},native_account_unavailable:{code:En,desc:Ln[En]},bad_token:{code:Nn,desc:Ln[Nn]}};class xn extends Ce{constructor(e,r,n,o,i,a,s,c){super(e,r,n),Object.setPrototypeOf(this,xn.prototype),this.timestamp=o||t.EMPTY_STRING,this.traceId=i||t.EMPTY_STRING,this.correlationId=a||t.EMPTY_STRING,this.claims=s||t.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=c}}function Bn(e,t,r){const n=!!e&&qn.indexOf(e)>-1,o=!!r&&Un.indexOf(r)>-1,i=!!t&&qn.some((e=>t.indexOf(e)>-1));return n||i||o}function Dn(e){return new xn(e,Ln[e])}
/*! @azure/msal-common v15.2.0 2025-03-04 */class Fn{static setRequestState(e,r,n){const o=Fn.generateLibraryState(e,n);return r?`${o}${t.RESOURCE_DELIM}${r}`:o}static generateLibraryState(e,t){if(!e)throw gt(We);const r={id:e.createNewGuid()};t&&(r.meta=t);const n=JSON.stringify(r);return e.base64Encode(n)}static parseRequestState(e,r){if(!e)throw gt(We);if(!r)throw gt(Ee);try{const n=r.split(t.RESOURCE_DELIM),o=n[0],i=n.length>1?n.slice(1).join(t.RESOURCE_DELIM):t.EMPTY_STRING,a=e.base64Decode(o),s=JSON.parse(a);return{userRequestState:i||t.EMPTY_STRING,libraryState:s}}catch(e){throw gt(Ee)}}}
/*! @azure/msal-common v15.2.0 2025-03-04 */const Kn="sw";class zn{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(ln.PopTokenGenerateCnf,e.correlationId);const r=await mn(this.generateKid.bind(this),ln.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),n=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:n}}async generateKid(e){this.performanceClient?.addQueueMeasurement(ln.PopTokenGenerateKid,e.correlationId);return{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Kn}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,n){const{resourceRequestMethod:o,resourceRequestUri:i,shrClaims:a,shrNonce:s,shrOptions:c}=r,l=i?new Rr(i):void 0,d=l?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:wt(),m:o?.toUpperCase(),u:d?.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:d?.AbsolutePath,q:d?.QueryString?[[],d.QueryString]:void 0,client_claims:a||void 0,...n},t,c,r.correlationId)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class Gn{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class $n{constructor(e,t,r,n,o,i,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=n,this.serializableCache=o,this.persistencePlugin=i,this.performanceClient=a}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?gt(_e,"Cached State"):gt(_e,"Server State");let r,n;try{r=decodeURIComponent(e.state)}catch(t){throw gt(Ee,e.state)}try{n=decodeURIComponent(t)}catch(t){throw gt(Ee,e.state)}if(r!==n)throw gt(Re);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",r=e.error_uri?.lastIndexOf(t);return r&&r>=0?e.error_uri?.substring(r+5):void 0}(e);if(Bn(e.error,e.error_description,e.suberror))throw new xn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new Tn(e.error||"",e.error_description,e.suberror,t)}}validateTokenResponse(e,a){if(e.error||e.error_description||e.suberror){const s=`Error(s): ${e.error_codes||t.NOT_AVAILABLE} - Timestamp: ${e.timestamp||t.NOT_AVAILABLE} - Description: ${e.error_description||t.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||t.NOT_AVAILABLE} - Trace ID: ${e.trace_id||t.NOT_AVAILABLE}`,c=e.error_codes?.length?e.error_codes[0]:void 0,l=new Tn(e.error,s,e.suberror,c,e.status);if(a&&e.status&&e.status>=o&&e.status<=i)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${l}`);if(a&&e.status&&e.status>=r&&e.status<=n)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${l}`);if(Bn(e.error,e.error_description,e.suberror))throw new xn(e.error,e.error_description,e.suberror,e.timestamp||t.EMPTY_STRING,e.trace_id||t.EMPTY_STRING,e.correlation_id||t.EMPTY_STRING,e.claims||t.EMPTY_STRING,c);throw l}}async handleServerTokenResponse(e,r,n,o,i,a,s,c,l){let d,h;if(this.performanceClient?.addQueueMeasurement(ln.HandleServerTokenResponse,e.correlation_id),e.id_token){if(d=It(e.id_token||t.EMPTY_STRING,this.cryptoObj.base64Decode),i&&i.nonce&&d.nonce!==i.nonce)throw gt(Pe);if(o.maxAge||0===o.maxAge){const e=d.auth_time;if(!e)throw gt(Me);Tt(e,o.maxAge)}}this.homeAccountIdentifier=Sr.generateHomeAccountId(e.client_info||t.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,d),i&&i.state&&(h=Fn.parseRequestState(this.cryptoObj,i.state)),e.key_id=e.key_id||o.sshKid||void 0;const u=this.generateCacheRecord(e,r,n,o,d,a,i);let g;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),g=new Gn(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(g)),s&&!c&&u.account){const e=u.account.generateAccountKey();if(!this.cacheStorage.getAccount(e))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await $n.generateAuthenticationResult(this.cryptoObj,r,u,!1,o,d,h,void 0,l)}await this.cacheStorage.saveCacheRecord(u,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&g&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(g))}return $n.generateAuthenticationResult(this.cryptoObj,r,u,!1,o,d,h,e,l)}generateCacheRecord(e,t,r,n,o,i,a){const s=t.getPreferredCache();if(!s)throw gt($e);const c=Ar(o);let l,d;e.id_token&&o&&(l=bt(this.homeAccountIdentifier,s,e.id_token,this.clientId,c||""),d=Qn(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o,e.client_info,s,c,a,void 0,this.logger));let h=null;if(e.access_token){const o=e.scope?gr.fromString(e.scope):new gr(n.scopes||[]),a=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,l=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,d=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,u=r+a,g=u+l,p=d&&d>0?r+d:void 0;h=Et(this.homeAccountIdentifier,s,e.access_token,this.clientId,c||t.tenant||"",o.printScopes(),u,g,this.cryptoObj.base64Decode,p,e.token_type,i,e.key_id,n.claims,n.requestedClaimsHash)}let u=null;if(e.refresh_token){let t;if(e.refresh_token_expires_in){t=r+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)}u=Rt(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,i,t)}let g=null;return e.foci&&(g={clientId:this.clientId,environment:s,familyId:e.foci}),{account:d,idToken:l,accessToken:h,refreshToken:u,appMetadata:g}}static async generateAuthenticationResult(e,r,n,o,i,a,s,c,l){let d,h,u=t.EMPTY_STRING,g=[],p=null,m=t.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType!==z.POP||i.popKid)u=n.accessToken.secret;else{const t=new zn(e),{secret:r,keyId:o}=n.accessToken;if(!o)throw gt(nt);u=await t.signPopToken(r,o,i)}g=gr.fromString(n.accessTLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */async function Wn(e,t,r){if("string"==typeof e)return e;return e({clientId:t,tokenEndpoint:r})}
/*! @azure/msal-common v15.2.0 2025-03-04 */class jn extends Sn{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async getAuthCodeUrl(e){this.performanceClient?.addQueueMeasurement(ln.GetAuthCodeUrl,e.correlationId);const t=await mn(this.createAuthCodeUrlQueryString.bind(this),ln.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return Rr.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(ln.AuthClientAcquireToken,e.correlationId),!e.code)throw gt(Le);const r=wt(),n=await mn(this.executeTokenRequest.bind(this),ln.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),o=n.headers?.[p],i=new $n(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return i.validateTokenResponse(n.body),mn(i.handleServerTokenResponse.bind(i),ln.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,r,e,t,void 0,void 0,void 0,o)}handleFragmentResponse(e,t){if(new $n(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw gt(et);return e}getLogoutUri(e){if(!e)throw hr(jt);const t=this.createLogoutUrlQueryString(e);return Rr.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(ln.AuthClientExecuteTokenRequest,t.correlationId);const r=this.createTokenQueryParameters(t),n=Rr.appendQueryString(e.tokenEndpoint,r),o=await mn(this.createTokenRequestBody.bind(this),ln.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let i;if(t.clientInfo)try{const e=pr(t.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${e.uid}${N}${e.utid}`,type:Vr}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(i||t.ccsCredential),s={clientId:t.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return mn(this.executePostToTokenEndpoint.bind(this),ln.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(n,o,a,s,t.correlationId,ln.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(ln.AuthClientCreateTokenRequestBody,e.correlationId);const t=new cn(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||e.tokenBodyParameters?.[Jr]||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):sn.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!jr(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const r=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await Wn(r.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(r.assertionType)}if(t.addGrantType(b),t.addClientInfo(),e.authenticationScheme===z.POP){const r=new zn(this.cryptoUtils,this.performanceClient);let n;if(e.popKid)n=this.cryptoUtils.encodeKid(e.popKid);else{n=(await mn(r.generateCnf.bind(r),ln.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString}t.addPopToken(n)}else if(e.authenticationScheme===z.SSH){if(!e.sshJwk)throw hr(er);t.addSshJwk(e.sshJwk)}let r;if((!ur.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=pr(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${t.uid}${N}${t.utid}`,type:Vr}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case Vr:try{const e=mr(r.credential);t.addCcsOid(e)}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case Yr:t.addCcsUpn(r.credential)}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clieLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */class Vn extends Sn{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(ln.RefreshTokenClientAcquireToken,e.correlationId);const t=wt(),r=await mn(this.executeTokenRequest.bind(this),ln.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),n=r.headers?.[p],o=new $n(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return o.validateTokenResponse(r.body),mn(o.handleServerTokenResponse.bind(o),ln.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,n)}async acquireTokenByRefreshToken(e){if(!e)throw hr(Wt);if(this.performanceClient?.addQueueMeasurement(ln.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw gt(ze);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await mn(this.acquireTokenWithCachedRefreshToken.bind(this),ln.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const r=t instanceof xn&&t.errorCode===bn,n=t instanceof Tn&&t.errorCode===j&&t.subError===V;if(r||n)return mn(this.acquireTokenWithCachedRefreshToken.bind(this),ln.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return mn(this.acquireTokenWithCachedRefreshToken.bind(this),ln.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(ln.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const r=pn(this.cacheManager.getRefreshToken.bind(this.cacheManager),ln.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!r)throw Dn(bn);if(r.expiresOn&&At(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(r.expiresOn)},e.correlationId),Dn(Rn);const n={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||z.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:Vr}};try{return await mn(this.acquireToken.bind(this),ln.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(n)}catch(t){if(t instanceof xn&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(r.expiresOn)},e.correlationId),t.subError===Nn)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const e=St(r);this.cacheManager.removeRefreshToken(e)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(ln.RefreshTokenClientExecuteTokenRequest,e.correlationId);const r=this.createTokenQueryParameters(e),n=Rr.appendQueryString(t.tokenEndpoint,r),o=await mn(this.createTokenRequestBody.bind(this),ln.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),i=this.createTokenRequestHeaders(e.ccsCredential),a={clientId:e.tokenBodyParameters?.clientId||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return mn(this.executePostToTokenEndpoint.bind(this),ln.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(n,o,i,a,e.correlationId,ln.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(ln.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,r=new cn(t,this.performanceClient);if(r.addClientId(e.embeddedClientId||e.tokenBodyParameters?.[Jr]||this.config.authOptions.clientId),e.redirectUri&&r.addRedirectUri(e.redirectUri),r.addScopes(e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),r.addGrantType(E),r.addClientInfo(),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!jr(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),r.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const t=this.config.clientCredentials.clientAssertion;r.addClientAssertion(await Wn(t.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),r.addClientAssertionType(t.assertionType)}if(e.authenticationScheme===z.POP){const t=new zn(this.cryptoUtils,this.performanceClient);let n;if(e.popKid)n=this.cryptoUtils.encodeKid(e.popKid);else{n=(aLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */class Yn extends Sn{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(ln.SilentFlowClientAcquireCachedToken,e.correlationId);let t=ae;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!ur.isEmptyObj(e.claims))throw this.setCacheOutcome(se,e.correlationId),gt(Je);if(!e.account)throw gt(ze);const r=e.account.tenantId||function(e){const t=new Rr(e).getUrlComponents(),r=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(r){case C:case y:case v:return;default:return r}}(e.authority),n=this.cacheManager.getTokenKeys(),o=this.cacheManager.getAccessToken(e.account,e,n,r,this.performanceClient,e.correlationId);if(!o)throw this.setCacheOutcome(ce,e.correlationId),gt(Je);if(kt(o.cachedAt)||At(o.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(le,e.correlationId),gt(Je);o.refreshOn&&At(o.refreshOn,0)&&(t=de);const i=e.authority||this.authority.getPreferredCache(),a={account:this.cacheManager.readAccountFromCache(e.account),accessToken:o,idToken:this.cacheManager.getIdToken(e.account,n,r,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(i)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await mn(this.generateResultFromCacheRecord.bind(this),ln.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(a,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),e!==ae&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let r;if(this.performanceClient?.addQueueMeasurement(ln.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId),e.idToken&&(r=It(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=r?.auth_time;if(!e)throw gt(Me);Tt(e,t.maxAge)}return $n.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */const Jn={sendGetRequestAsync:()=>Promise.reject(gt(st)),sendPostRequestAsync:()=>Promise.reject(gt(st))};
/*! @azure/msal-common v15.2.0 2025-03-04 */function Xn(e){const{skus:t,libraryName:r,libraryVersion:n,extensionName:o,extensionVersion:i}=e,a=new Map([[0,[r,n]],[2,[o,i]]]);let s=[];if(t?.length){if(s=t.split(","),s.length<4)return t}else s=Array.from({length:4},(()=>"|"));return a.forEach(((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:r,skuName:n,skuVersion:o}=e;if(r>=t.length)return;t[r]=[n,o].join("|")}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})})),s.join(",")}class Zn{constructor(e,r){this.cacheOutcome=ae,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||t.EMPTY_STRING,this.wrapperVer=e.wrapperVer||t.EMPTY_STRING,this.telemetryCacheKey=K.CACHE_KEY+M+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${K.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r?.length&&t.push(`broker_error=${r}`);const n=t.join(K.VALUE_SEPARATOR),o=[e,this.getRegionDiscoveryFields()].join(K.VALUE_SEPARATOR);return[K.SCHEMA_VERSION,o,n].join(K.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Zn.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(K.VALUE_SEPARATOR),n=e.errors.slice(0,t).join(K.VALUE_SEPARATOR),o=e.errors.length,i=[o,t<o?K.OVERFLOW_TRUE:K.OVERFLOW_FALSE].join(K.VALUE_SEPARATOR);return[K.SCHEMA_VERSION,e.cacheHits,r,n,i].join(K.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=K.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Ce?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(K.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=Zn.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey);else{const r={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}}static maxErrorsToSend(e){let r,n=0,o=0;const i=e.errors.length;for(r=0;r<i;r++){const i=e.failedRequests[2*r]||t.EMPTY_STRING,a=e.failedRequests[2*r+1]||t.EMPTY_STRING,s=e.errors[r]||t.EMPTY_STRING;if(o+=i.toString().length+a.toString().length+s.length+3,!(o<K.MAX_LAST_HEADER_BYTES))break;n+=1}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||t.EMPTY_STRING),e.push(this.regionSource||t.EMPTY_STRING),e.push(this.regionOutcome||t.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return Xn(e)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */const eo="missing_kid_error",to="missing_alg_error",ro={[eo]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[to]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class no extends Ce{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,no.prototype)}}function oo(e){return new no(e,ro[e])}
/*! @azure/msal-common v15.2.0 2025-03-04 */class io{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw oo(eo);if(!e.alg)throw oo(to);const t=new io({typ:e.typ||he.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}
/*! @azure/msal-common v15.2.0 2025-03-04 */class ao{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class so{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:hn,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new ao}}startPerformanceMeasurement(){return new ao}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}
/*! @azure/msal-common v15.2.0 2025-03-04 */function co(e,t,r,n=5){if(e instanceof Error)return e instanceof Ce?(r.errorCode=e.errorCode,r.subErrorCode=e.subError,void((e instanceof Tn||e instanceof xn)&&(r.serverErrorNo=e.errorNo))):void(e instanceof Hr?r.errorCode=e.errorCode:r.errorStack?.length?t.trace("PerformanceClient.addErrorStack: Stack already exist",r.correlationId):e.stack?.length?(e.stack&&(r.errorStack=function(e,t){if(t<0)return[];const r=e.split("\n")||[],n=[],o=r[0];o.startsWith("TypeError: Cannot read property")||o.startsWith("TypeError: Cannot read properties of")||o.startsWith("TypeError: Cannot set property")||o.startsWith("TypeError: Cannot set properties of")||o.endsWith("is not a function")?n.push(lo(o)):(o.startsWith("SyntaxError")||o.startsWith("TypeError"))&&n.push(lo(o.replace(/['].*[']|["].*["]/g,"<redacted>")));for(let e=1;e<r.length&&!(n.length>=t);e++){const t=r[e];n.push(lo(t))}return n}(e.stack,n)),r.errorName=e.name):t.trace("PerformanceClient.addErrorStack: Input stack is empty",r.correlationId));t.trace("PerformanceClient.addErrorStack: Input error is not instance of Error",r.correlationId)}function lo(e){const t=e.lastIndexOf(" ")+1;if(t<1)return e;const r=e.substring(t);let n=r.lastIndexOf("/");return n=n<0?r.lastIndexOf("\\"):n,n>=0?(e.substring(0,t)+"("+r.substring(n+1)+(")"===r.charAt(r.length-1)?"":")")).trimStart():e.trimStart()}class ho{constructor(e,t,r,n,o,i,a,s){this.authority=t,this.libraryName=n,this.libraryVersion=o,this.applicationTelemetry=i,this.clientId=e,this.logger=r,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.eventStack=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map,this.intFields=a||new Set;for(const e of gn)this.intFields.add(e);this.abbreviations=s||new Map;for(const[e,t]of dn)this.abbreviations.set(e,t)}startPerformanceMeasurement(e,t){return{}}getPreQueueTime(e,t){const r=this.preQueueTimeByCorrelationId.get(t);if(r){if(r.name===e)return r.time;this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue time found for ${e}, unable to add queue measurement`)}else this.logger.trace(`PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: ${t}, unable to add queue measurement`)}calculateQueuedTime(e,t){return e<1?(this.logger.trace(`PerformanceClient: preQueueTime should be a positive integer and not ${e}`),0):t<1?(this.logger.trace(`PerformanceClient: currentTime should be a positive integer and not ${t}`),0):t<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):t-e}addQueueMeasurement(e,t,r,n){if(!t)return void this.logger.trace(`PerformanceClient.addQueueMeasurement: correlationId not provided for ${e}, cannot add queue measurement`);if(0===r)this.logger.trace(`PerformanceClient.addQueueMeasurement: queue time provided for ${e} is ${r}`);else if(!r)return void this.logger.trace(`PerformanceClient.addQueueMeasurement: no queue time provided for ${e}`);const o={eventName:e,queueTime:n?0:r,manuallyCompleted:n},i=this.queueMeasurements.get(t);if(i)i.push(o),this.queueMeasurements.set(t,i);else{this.logger.trace(`PerformanceClient.addQueueMeasurement: adding correlationId ${t} to queue measurements`);const e=[o];this.queueMeasurements.set(t,e)}this.preQueueTimeByCorrelationId.delete(t)}startMeasurement(e,t){const r=t||this.generateId();t||this.logger.info(`PerformanceClient: No correlation id provided for ${e}, generating`,r),this.logger.trace(`PerformanceClient: Performance measurement started for ${e}`,r);const n={eventId:this.generateId(),status:hn,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:r,appName:this.applicationTelemetry?.appName,appVersion:this.applicationTelemetry?.appVersion};var o,i,a;return this.cacheEventByCorrelationId(n),o=n,i=this.abbreviations,(a=this.eventStack.get(r))&&a.push({name:i.get(o.name)||o.name}),{end:(e,t)=>this.endMeasurement({...n,...e},t),discard:()=>this.discardMeasurements(n.correlationId),add:e=>this.addFields(e,n.correlationId),increment:e=>this.incrementFields(e,n.correlationId),event:n,measurement:new ao}}endMeasurement(e,t){const r=this.eventsByCorrelationId.get(e.correlationId);if(!r)return this.logger.trace(`PerformanceClient: Measurement not found for ${e.eventId}`,e.correlationId),null;const n=e.eventId===r.eventId;let o={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};e.durationMs=Math.round(e.durationMs||this.getDurationMs(e.startTimeMs));const i=JSON.stringify(function(e,t,r,n){if(!r?.length)return;const o=e=>e.length?e[e.length-1]:void 0,i=t.get(e.name)||e.name,a=o(r);if(a?.name!==i)return;const s=r?.pop();if(!s)return;const c=n instanceof Ce?n.errorCode:n instanceof Error?n.name:void 0,l=n instanceof Ce?n.subError:void 0;c&&s.childErr!==c&&(s.err=c,l&&(s.subErr=l)),delete s.name,delete s.childErr;const d={...s,dur:e.durationMs};e.sLine truncated
/*! @azure/msal-common v15.2.0 2025-03-04 */,e.AuthenticationScheme=z,e.AzureCloudInstance=vt,e.BrowserAuthError=di,e.BrowserAuthErrorCodes=ai,e.BrowserAuthErrorMessage=li,e.BrowserCacheLocation=Si,e.BrowserConfigurationAuthError=Ra,e.BrowserConfigurationAuthErrorCodes=Sa,e.BrowserConfigurationAuthErrorMessage=Ea,e.BrowserPerformanceClient=class extends ho{constructor(e,r,n){super(e.auth.clientId,e.auth.authority||`${t.DEFAULT_AUTHORITY}`,new ft(e.system?.loggerOptions||{},Ja,Xa),Ja,Xa,e.telemetry?.application||{appName:"",appVersion:""},r,n)}generateId(){return pa()}getPageVisibility(){return document.visibilityState?.toString()||null}deleteIncompleteSubMeasurements(e){_c()?.then((t=>{const r=this.eventsByCorrelationId.get(e.event.correlationId),n=r&&r.eventId===e.event.eventId,o=[];n&&r?.incompleteSubMeasurements&&r.incompleteSubMeasurements.forEach((e=>{o.push({...e})})),t.BrowserPerformanceMeasurement.flushMeasurements(e.event.correlationId,o)}))}startMeasurement(e,t){const r=this.getPageVisibility(),n=super.startMeasurement(e,t),o=Pc()?window.performance.now():void 0,i=_c()?.then((t=>new t.BrowserPerformanceMeasurement(e,n.event.correlationId)));return i?.then((e=>e.startMeasurement())),{...n,end:(e,t)=>{const a=n.end({...e,startPageVisibility:r,endPageVisibility:this.getPageVisibility(),durationMs:Mc(o)},t);return i?.then((e=>e.endMeasurement())),this.deleteIncompleteSubMeasurements(n),a},discard:()=>{n.discard(),i?.then((e=>e.flushMeasurement())),this.deleteIncompleteSubMeasurements(n)}}}setPreQueueTime(e,t){if(!Pc())return void this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for ${e}`);if(!t)return void this.logger.trace(`BrowserPerformanceClient: correlationId for ${e} not provided, unable to set telemetry queue time`);const r=this.preQueueTimeByCorrelationId.get(t);r&&(this.logger.trace(`BrowserPerformanceClient: Incomplete pre-queue ${r.name} found`,t),this.addQueueMeasurement(r.name,t,void 0,!0)),this.preQueueTimeByCorrelationId.set(t,{name:e,time:window.performance.now()})}addQueueMeasurement(e,t,r,n){if(!Pc())return void this.logger.trace(`BrowserPerformanceClient: window performance API not available, unable to add queue measurement for ${e}`);if(!t)return void this.logger.trace(`BrowserPerformanceClient: correlationId for ${e} not provided, unable to add queue measurement`);const o=super.getPreQueueTime(e,t);if(!o)return;const i=window.performance.now(),a=r||super.calculateQueuedTime(o,i);return super.addQueueMeasurement(e,t,a,n)}},e.BrowserPerformanceMeasurement=Nc,e.BrowserUtils=$a,e.CacheLookupPolicy=ji,e.ClientAuthError=ut,e.ClientAuthErrorCodes=lt,e.ClientAuthErrorMessage=ht,e.ClientConfigurationError=dr,e.ClientConfigurationErrorCodes=sr,e.ClientConfigurationErrorMessage=lr,e.DEFAULT_IFRAME_TIMEOUT_MS=Ya,e.EventHandler=Hs,e.EventMessageUtils=class{static getInteractionStatusFromEvent(t,r){switch(t.eventType){case bs.LOGIN_START:return Gi.Login;case bs.SSO_SILENT_START:return Gi.SsoSilent;case bs.ACQUIRE_TOKEN_START:if(t.interactionType===e.InteractionType.Redirect||t.interactionType===e.InteractionType.Popup)return Gi.AcquireToken;break;case bs.HANDLE_REDIRECT_START:return Gi.HandleRedirect;case bs.LOGOUT_START:return Gi.Logout;case bs.SSO_SILENT_SUCCESS:case bs.SSO_SILENT_FAILURE:if(r&&r!==Gi.SsoSilent)break;return Gi.None;case bs.LOGOUT_END:if(r&&r!==Gi.Logout)break;return Gi.None;case bs.HANDLE_REDIRECT_END:if(r&&r!==Gi.HandleRedirect)break;return Gi.None;case bs.LOGIN_SUCCESS:case bs.LOGIN_FAILURE:case bs.ACQUIRE_TOKEN_SUCCESS:case bs.ACQUIRE_TOKEN_FAILURE:case bs.RESTORE_FROM_BFCACHE:if(t.interactionType===e.InteractionType.Redirect||t.interactionType===e.InteractionType.Popup){if(r&&r!==Gi.Login&&r!==Gi.AcquireToken)break;return Gi.None}}return null}},e.EventType=bs,e.InteractionRequiredAuthError=xn,e.InteractionRequiredAuthErrorCodes=On,e.InteractionRequiredAuthErrorMessage=Hn,e.InteractionStatus=Gi,e.JsonWebTokenTypes=he,e.LocalStorage=As,e.Logger=ft,e.MemoryStorage=us,e.NavigationClient=Qa,e.OIDC_DEFAULT_SCOPES=a,e.PerformanceEvents=ln,e.PromptValue=w,e.ProtocolMode=kr,e.PublicClientApplication=Ac,e.PublicClientNext=Ec,e.ServerError=Tn,e.ServerResponseType=k,e.SessionStorage=ks,e.SignedHttpRequest=class{constructor(e,t){const r=t&&t.loggerOptions||{};this.logger=new ft(r,Ja,Xa),this.cryptoOps=new ps(this.logger),this.popTokenGenerator=new zn(this.cryptoOps),this.shrParameters=e}async generatePublicKeyThumbprint(){const{kid:e}=await this.popTokenGenerator.generateKid(this.shrParameters);return e}async signRequest(e,t,r){return this.popTokenGenerator.signPayload(e,t,this.shrParameters,r)}async removeKeys(e){return this.cryptoOps.removeTokenBindingKey(e)}},e.StringUtils=ur,e.StubPerformanceClient=so,e.UrlString=Rr,e.WrapperSKU={React:"@azure/msal-react",Angular:"@azure/msal-angular"},e.createNestablePublicClientApplication=async function(e){const t=new ls(e);if(await t.initialize(),t.isAvailable()){const r=newLine truncated
+1
View File
@@ -0,0 +1 @@
{"type":"commonjs"}
@@ -0,0 +1,55 @@
import { AccountFilter, AccountInfo, Logger, PerformanceCallbackFunction } from "@azure/msal-common/browser";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { WrapperSKU } from "../utils/BrowserConstants.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { ITokenCache } from "../cache/ITokenCache.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
import { EventType } from "../event/EventType.js";
export interface IPublicClientApplication {
initialize(request?: InitializeApplicationRequest): Promise<void>;
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
removeEventCallback(callbackId: string): void;
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
removePerformanceCallback(callbackId: string): boolean;
enableAccountStorageEvents(): void;
disableAccountStorageEvents(): void;
getAccount(accountFilter: AccountFilter): AccountInfo | null;
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
getAccountByLocalId(localId: string): AccountInfo | null;
getAccountByUsername(userName: string): AccountInfo | null;
getAllAccounts(): AccountInfo[];
handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;
loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
loginRedirect(request?: RedirectRequest): Promise<void>;
logout(logoutRequest?: EndSessionRequest): Promise<void>;
logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
getTokenCache(): ITokenCache;
getLogger(): Logger;
setLogger(logger: Logger): void;
setActiveAccount(account: AccountInfo | null): void;
getActiveAccount(): AccountInfo | null;
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
setNavigationClient(navigationClient: INavigationClient): void;
/** @internal */
getConfiguration(): BrowserConfiguration;
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
}
export declare const stubbedPublicClientApplication: IPublicClientApplication;
//# sourceMappingURL=IPublicClientApplication.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/app/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,WAAW,EACX,MAAM,EACN,2BAA2B,EAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,M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AC;IACjE,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/D,gBAAgB;IAChB,gBAAgB,IAAI,oBAAoB,CAAC;IACzC,YAAY,CACR,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,eAAO,MAAM,8BAA8B,EAAE,wBAkK5C,CAAC"}
@@ -0,0 +1,296 @@
import { ITokenCache } from "../cache/ITokenCache.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { WrapperSKU } from "../utils/BrowserConstants.js";
import { IPublicClientApplication } from "./IPublicClientApplication.js";
import { IController } from "../controllers/IController.js";
import { PerformanceCallbackFunction, AccountInfo, AccountFilter, Logger } from "@azure/msal-common/browser";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { BrowserConfiguration, Configuration } from "../config/Configuration.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
import { EventType } from "../event/EventType.js";
/**
* The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications
* to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.
*/
export declare class PublicClientApplication implements IPublicClientApplication {
protected controller: IController;
/**
* Creates StandardController and passes it to the PublicClientApplication
*
* @param configuration {Configuration}
*/
static createPublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
/**
* @constructor
* Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object
*
* Important attributes in the Configuration object for auth are:
* - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview
* - authority: the authority URL for your application.
* - redirect_uri: the uri of your application registered in the portal.
*
* In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.
* It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}
* If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
* If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
* If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
* To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
*
* In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/
* Full B2C functionality will be available in this library in future versions.
*
* @param configuration Object for the MSAL PublicClientApplication instance
* @param IController Optional parameter to explictly set the controller. (Will be removed when we remove public constructor)
*/
constructor(configuration: Configuration, controller?: IController);
/**
* Initializer function to perform async startup tasks such as connecting to WAM extension
* @param request {?InitializeApplicationRequest}
*/
initialize(request?: InitializeApplicationRequest): Promise<void>;
/**
* Use when you want to obtain an access_token for your API via opening a popup window in the user's browser
*
* @param request
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
/**
* Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects
* the page, so any code that follows this function will not execute.
*
* IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
* browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
*
* @param request
*/
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
/**
* Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.
*
* @param {@link (SilentRequest:type)}
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthenticationResult} object
*/
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
/**
* This function redeems an authorization code (passed as code) from the eSTS token endpoint.
* This authorization code should be acquired server-side using a confidential client to acquire a spa_code.
* This API is not indended for normal authorization code acquisition and redemption.
*
* Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.
*
* @param request {@link AuthorizationCodeRequest}
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
/**
* Adds event callbacks to array
* @param callback
* @param eventTypes
*/
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
/**
* Removes callback with provided id from callback array
* @param callbackId
*/
removeEventCallback(callbackId: string): void;
/**
* Registers a callback to receive performance events.
*
* @param {PerformanceCallbackFunction} callback
* @returns {string}
*/
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
/**
* Removes a callback registered with addPerformanceCallback.
*
* @param {string} callbackId
* @returns {boolean}
*/
removePerformanceCallback(callbackId: string): boolean;
/**
* Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
*/
enableAccountStorageEvents(): void;
/**
* Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
*/
disableAccountStorageEvents(): void;
/**
* Returns the first account found in the cache that matches the account filter passed in.
* @param accountFilter
* @returns The first account found in the cache matching the provided filter or null if no account could be found.
*/
getAccount(accountFilter: AccountFilter): AccountInfo | null;
/**
* Returns the signed in account matching homeAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param homeAccountId
* @returns The account object stored in MSAL
* @deprecated - Use getAccount instead
*/
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
/**
* Returns the signed in account matching localAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param localAccountId
* @returns The account object stored in MSAL
* @deprecated - Use getAccount instead
*/
getAccountByLocalId(localId: string): AccountInfo | null;
/**
* Returns the signed in account matching username.
* (the account object is created at the time of successful login)
* or null when no matching account is found.
* This API is provided for convenience but getAccountById should be used for best reliability
* @param userName
* @returns The account object stored in MSAL
* @deprecated - Use getAccount instead
*/
getAccountByUsername(userName: string): AccountInfo | null;
/**
* Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
* @param accountFilter - (Optional) filter to narrow down the accounts returned
* @returns Array of AccountInfo objects in cache
*/
getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
/**
* Event handler function which allows users to fire events after the PublicClientApplication object
* has loaded during redirect flows. This should be invoked on all page loads involved in redirect
* auth flows.
* @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.
* @returns Token response or null. If the return value is null, then no auth redirect was detected.
*/
handleRedirectPromise(hash?: string | undefined): Promise<AuthenticationResult | null>;
/**
* Use when initiating the login process via opening a popup window in the user's browser
*
* @param request
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
loginPopup(request?: PopupRequest | undefined): Promise<AuthenticationResult>;
/**
* Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so
* any code that follows this function will not execute.
*
* IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
* browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
*
* @param request
*/
loginRedirect(request?: RedirectRequest | undefined): Promise<void>;
/**
* Deprecated logout function. Use logoutRedirect or logoutPopup instead
* @param logoutRequest
* @deprecated
*/
logout(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* 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`.
* @param logoutRequest
*/
logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server
* @param logoutRequest
*/
logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
/**
* This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:
* - Any browser using a form of Intelligent Tracking Prevention
* - If there is not an established session with the service
*
* In these cases, the request must be done inside a popup or full frame redirect.
*
* For the cases where interaction is required, you cannot send a request with prompt=none.
*
* If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as
* you session on the server still exists.
* @param request {@link SsoSilentRequest}
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
/**
* Gets the token cache for the application.
*/
getTokenCache(): ITokenCache;
/**
* Returns the logger instance
*/
getLogger(): Logger;
/**
* Replaces the default logger set in configurations with new Logger with new configurations
* @param logger Logger instance
*/
setLogger(logger: Logger): void;
/**
* Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
* @param account
*/
setActiveAccount(account: AccountInfo | null): void;
/**
* Gets the currently active account
*/
getActiveAccount(): AccountInfo | null;
/**
* Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
* @param sku
* @param version
*/
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
/**
* Sets navigation client
* @param navigationClient
*/
setNavigationClient(navigationClient: INavigationClient): void;
/**
* Returns the configuration object
* @internal
*/
getConfiguration(): BrowserConfiguration;
/**
* Hydrates cache with the tokens and account in the AuthenticationResult object
* @param result
* @param request - The request object that was used to obtain the AuthenticationResult
* @returns
*/
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
/**
* Clears tokens and account from the browser cache.
* @param logoutRequest
*/
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
}
/**
* creates NestedAppAuthController and passes it to the PublicClientApplication,
* falls back to StandardController if NestedAppAuthController is not available
*
* @param configuration
* @returns IPublicClientApplication
*
*/
export declare function createNestablePublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
/**
* creates PublicClientApplication using StandardController
*
* @param configuration
* @returns IPublicClientApplication
*
*/
export declare function createStandardPublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
//# sourceMappingURL=PublicClientApplication.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACH,2BAA2B,EAC3B,WAAW,EACX,aAAa,EACb,MAAM,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,EACH,oBAAoB,EACpB,aAAa,EAChB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACp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;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI;IAInD;;OAEG;IACH,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAItC;;;;OAIG;IACH,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIhE;;;OAGG;IACH,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI;IAI9D;;;OAGG;IACH,gBAAgB,IAAI,oBAAoB;IAIxC;;;;;OAKG;IACG,YAAY,CACd,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAIhB;;;OAGG;IACH,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/D;AAED;;;;;;;GAOG;AACH,wBAAsB,qCAAqC,CACvD,aAAa,EAAE,aAAa,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAenC;AAED;;;;;;GAMG;AACH,wBAAsB,qCAAqC,CACvD,aAAa,EAAE,aAAa,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAInC"}
+278
View File
@@ -0,0 +1,278 @@
import { ITokenCache } from "../cache/ITokenCache.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { WrapperSKU } from "../utils/BrowserConstants.js";
import { IPublicClientApplication } from "./IPublicClientApplication.js";
import { IController } from "../controllers/IController.js";
import { PerformanceCallbackFunction, AccountInfo, AccountFilter, Logger } from "@azure/msal-common/browser";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { BrowserConfiguration, Configuration } from "../config/Configuration.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { EventType } from "../event/EventType.js";
/**
* PublicClientNext is an early look at the planned implementation of PublicClientApplication in the next major version of MSAL.js.
* It contains support for multiple API implementations based on the runtime environment that it is running in.
*
* The goals of these changes are to provide a clean separation of behavior between different operating contexts (Nested App Auth, Platform Brokers, Plain old Browser, etc.)
* while still providing a consistent API surface for developers.
*
* Please use PublicClientApplication for any prod/real-world scenarios.
* Note: PublicClientNext is experimental and subject to breaking changes without following semver
*
*/
export declare class PublicClientNext implements IPublicClientApplication {
protected controller: IController;
protected configuration: Configuration;
static createPublicClientApplication(configuration: Configuration): Promise<IPublicClientApplication>;
/**
* @constructor
* Constructor for the PublicClientNext used to instantiate the PublicClientNext object
*
* Important attributes in the Configuration object for auth are:
* - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview
* - authority: the authority URL for your application.
* - redirect_uri: the uri of your application registered in the portal.
*
* In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.
* It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}
* If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
* If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
* If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
* To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
*
* In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/
* Full B2C functionality will be available in this library in future versions.
*
* @param configuration Object for the MSAL PublicClientApplication instance
* @param IController Optional parameter to explictly set the controller. (Will be removed when we remove public constructor)
*/
private constructor();
/**
* Initializer function to perform async startup tasks such as connecting to WAM extension
*/
initialize(): Promise<void>;
/**
* Use when you want to obtain an access_token for your API via opening a popup window in the user's browser
*
* @param request
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
/**
* Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects
* the page, so any code that follows this function will not execute.
*
* IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
* browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
*
* @param request
*/
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
/**
* Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.
*
* @param {@link (SilentRequest:type)}
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthenticationResult} object
*/
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
/**
* This function redeems an authorization code (passed as code) from the eSTS token endpoint.
* This authorization code should be acquired server-side using a confidential client to acquire a spa_code.
* This API is not indended for normal authorization code acquisition and redemption.
*
* Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.
*
* @param request {@link AuthorizationCodeRequest}
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
/**
* Adds event callbacks to array
* @param callback
*/
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
/**
* Removes callback with provided id from callback array
* @param callbackId
*/
removeEventCallback(callbackId: string): void;
/**
* Registers a callback to receive performance events.
*
* @param {PerformanceCallbackFunction} callback
* @returns {string}
*/
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
/**
* Removes a callback registered with addPerformanceCallback.
*
* @param {string} callbackId
* @returns {boolean}
*/
removePerformanceCallback(callbackId: string): boolean;
/**
* Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
*/
enableAccountStorageEvents(): void;
/**
* Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
*/
disableAccountStorageEvents(): void;
/**
* Returns the first account found in the cache that matches the account filter passed in.
* @param accountFilter
* @returns The first account found in the cache matching the provided filter or null if no account could be found.
*/
getAccount(accountFilter: AccountFilter): AccountInfo | null;
/**
* Returns the signed in account matching homeAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param homeAccountId
* @returns The account object stored in MSAL
* @deprecated - Use getAccount instead
*/
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
/**
* Returns the signed in account matching localAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param localAccountId
* @returns The account object stored in MSAL
* @deprecated - Use getAccount instead
*/
getAccountByLocalId(localId: string): AccountInfo | null;
/**
* Returns the signed in account matching username.
* (the account object is created at the time of successful login)
* or null when no matching account is found.
* This API is provided for convenience but getAccountById should be used for best reliability
* @param userName
* @returns The account object stored in MSAL
* @deprecated - Use getAccount instead
*/
getAccountByUsername(userName: string): AccountInfo | null;
/**
* Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
* @param accountFilter - (Optional) filter to narrow down the accounts returned
* @returns Array of AccountInfo objects in cache
*/
getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
/**
* Event handler function which allows users to fire events after the PublicClientApplication object
* has loaded during redirect flows. This should be invoked on all page loads involved in redirect
* auth flows.
* @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.
* @returns Token response or null. If the return value is null, then no auth redirect was detected.
*/
handleRedirectPromise(hash?: string | undefined): Promise<AuthenticationResult | null>;
/**
* Use when initiating the login process via opening a popup window in the user's browser
*
* @param request
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
loginPopup(request?: PopupRequest | undefined): Promise<AuthenticationResult>;
/**
* Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so
* any code that follows this function will not execute.
*
* IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
* browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
*
* @param request
*/
loginRedirect(request?: RedirectRequest | undefined): Promise<void>;
/**
* Deprecated logout function. Use logoutRedirect or logoutPopup instead
* @param logoutRequest
* @deprecated
*/
logout(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* 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`.
* @param logoutRequest
*/
logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server
* @param logoutRequest
*/
logoutPopup(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:
* - Any browser using a form of Intelligent Tracking Prevention
* - If there is not an established session with the service
*
* In these cases, the request must be done inside a popup or full frame redirect.
*
* For the cases where interaction is required, you cannot send a request with prompt=none.
*
* If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as
* you session on the server still exists.
* @param request {@link SsoSilentRequest}
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
/**
* Gets the token cache for the application.
*/
getTokenCache(): ITokenCache;
/**
* Returns the logger instance
*/
getLogger(): Logger;
/**
* Replaces the default logger set in configurations with new Logger with new configurations
* @param logger Logger instance
*/
setLogger(logger: Logger): void;
/**
* Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
* @param account
*/
setActiveAccount(account: AccountInfo | null): void;
/**
* Gets the currently active account
*/
getActiveAccount(): AccountInfo | null;
/**
* Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
* @param sku
* @param version
*/
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
/**
* Sets navigation client
* @param navigationClient
*/
setNavigationClient(navigationClient: INavigationClient): void;
/**
* Returns the configuration object
* @internal
*/
getConfiguration(): BrowserConfiguration;
/**
* Hydrates cache with the tokens and account in the AuthenticationResult object
* @param result
* @param request - The request object that was used to obtain the AuthenticationResult
* @returns
*/
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
/**
* Clears tokens and account from the browser cache.
* @param logoutRequest
*/
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
}
//# sourceMappingURL=PublicClientNext.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PublicClientNext.d.ts","sourceRoot":"","sources":["../../../src/app/PublicClientNext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACH,2BAA2B,EAC3B,WAAW,EACX,aAAa,EACb,MAAM,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EACH,oBAAoB,EACpB,aAAa,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,qB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H,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;OAGG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI;IAInD;;OAEG;IACH,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAItC;;;;OAIG;IACH,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIhE;;;OAGG;IACH,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI;IAI9D;;;OAGG;IACH,gBAAgB,IAAI,oBAAoB;IAIxC;;;;;OAKG;IACG,YAAY,CACd,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;IAIhB;;;OAGG;IACH,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/D"}
@@ -0,0 +1,63 @@
import { Logger, AuthenticationScheme, IPerformanceClient } from "@azure/msal-common/browser";
import { NativeExtensionRequestBody } from "./NativeRequest.js";
import { BrowserConfiguration } from "../../config/Configuration.js";
export declare class NativeMessageHandler {
private extensionId;
private extensionVersion;
private logger;
private readonly handshakeTimeoutMs;
private timeoutId;
private resolvers;
private handshakeResolvers;
private messageChannel;
private readonly windowListener;
private readonly performanceClient;
private readonly handshakeEvent;
constructor(logger: Logger, handshakeTimeoutMs: number, performanceClient: IPerformanceClient, extensionId?: string);
/**
* Sends a given message to the extension and resolves with the extension response
* @param body
*/
sendMessage(body: NativeExtensionRequestBody): Promise<object>;
/**
* Returns an instance of the MessageHandler that has successfully established a connection with an extension
* @param {Logger} logger
* @param {number} handshakeTimeoutMs
* @param {IPerformanceClient} performanceClient
* @param {ICrypto} crypto
*/
static createProvider(logger: Logger, handshakeTimeoutMs: number, performanceClient: IPerformanceClient): Promise<NativeMessageHandler>;
/**
* Send handshake request helper.
*/
private sendHandshakeRequest;
/**
* Invoked when a message is posted to the window. If a handshake request is received it means the extension is not installed.
* @param event
*/
private onWindowMessage;
/**
* Invoked when a message is received from the extension on the MessageChannel port
* @param event
*/
private onChannelMessage;
/**
* Returns the Id for the browser extension this handler is communicating with
* @returns
*/
getExtensionId(): string | undefined;
/**
* Returns the version for the browser extension this handler is communicating with
* @returns
*/
getExtensionVersion(): string | undefined;
/**
* Returns boolean indicating whether or not the request should attempt to use native broker
* @param logger
* @param config
* @param nativeExtensionProvider
* @param authenticationScheme
*/
static isPlatformBrokerAvailable(config: BrowserConfiguration, logger: Logger, nativeExtensionProvider?: NativeMessageHandler, authenticationScheme?: AuthenticationScheme): boolean;
}
//# sourceMappingURL=NativeMessageHandler.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeMessageHandler.d.ts","sourceRoot":"","sources":["../../../../src/broker/nativeBroker/NativeMessageHandler.ts"],"names":[],"mappings":"AASA,OAAO,EACH,MAAM,EAIN,oBAAoB,EAGpB,kBAAkB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEH,0BAA0B,EAC7B,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAUrE,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,SAAS,CAAyC;IAC1D,OAAO,CAAC,kBAAkB,CAAuC;IACjE,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgC;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqB;IACvD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA6B;gBAGxD,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,MAAM,EAC1B,iBAAiB,EAAE,kBAAkB,EACrC,WAAW,CAAC,EAAE,MAAM;IAexB;;;OAGG;IACG,WAAW,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC;IAwBpE;;;;;;OAMG;WACU,cAAc,CACvB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,MAAM,EAC1B,iBAAiB,EAAE,kBAAkB,GACtC,OAAO,CAAC,oBAAoB,CAAC;IAuBhC;;OAEG;YACW,oBAAoB;IAsDlC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAyDvB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAiGxB;;;OAGG;IACH,cAAc,IAAI,MAAM,GAAG,SAAS;IAIpC;;;OAGG;IACH,mBAAmB,IAAI,MAAM,GAAG,SAAS;IAIzC;;;;;;OAMG;IACH,MAAM,CAAC,yBAAyB,CAC5B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,MAAM,EACd,uBAAuB,CAAC,EAAE,oBAAoB,EAC9C,oBAAoB,CAAC,EAAE,oBAAoB,GAC5C,OAAO;CAoCb"}
@@ -0,0 +1,47 @@
import { NativeExtensionMethod } from "../../utils/BrowserConstants.js";
import { StoreInCache, StringDict } from "@azure/msal-common/browser";
/**
* Token request which native broker will use to acquire tokens
*/
export type NativeTokenRequest = {
accountId: string;
clientId: string;
authority: string;
redirectUri: string;
scope: string;
correlationId: string;
windowTitleSubstring: string;
prompt?: string;
nonce?: string;
claims?: string;
state?: string;
reqCnf?: string;
keyId?: string;
tokenType?: string;
shrClaims?: string;
shrNonce?: string;
resourceRequestMethod?: string;
resourceRequestUri?: string;
extendedExpiryToken?: boolean;
extraParameters?: StringDict;
storeInCache?: StoreInCache;
signPopToken?: boolean;
embeddedClientId?: string;
};
/**
* Request which will be forwarded to native broker by the browser extension
*/
export type NativeExtensionRequestBody = {
method: NativeExtensionMethod;
request?: NativeTokenRequest;
};
/**
* Browser extension request
*/
export type NativeExtensionRequest = {
channel: string;
responseId: string;
extensionId?: string;
body: NativeExtensionRequestBody;
};
//# sourceMappingURL=NativeRequest.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeRequest.d.ts","sourceRoot":"","sources":["../../../../src/broker/nativeBroker/NativeRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACrC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,0BAA0B,CAAC;CACpC,CAAC"}
@@ -0,0 +1,49 @@
/**
* Account properties returned by Native Platform e.g. WAM
*/
export type NativeAccountInfo = {
id: string;
properties: object;
userName: string;
};
/**
* Token response returned by Native Platform
*/
export type NativeResponse = {
access_token: string;
account: NativeAccountInfo;
client_info: string;
expires_in: number;
id_token: string;
properties: NativeResponseProperties;
scope: string;
state: string;
shr?: string;
extendedLifetimeToken?: boolean;
};
/**
* Properties returned under "properties" of the NativeResponse
*/
export type NativeResponseProperties = {
MATS?: string;
};
/**
* The native token broker can optionally include additional information about operations it performs. If that data is returned, MSAL.js will include the following properties in the telemetry it collects.
*/
export type MATS = {
is_cached?: number;
broker_version?: string;
account_join_on_start?: string;
account_join_on_end?: string;
device_join?: string;
prompt_behavior?: string;
api_error_code?: number;
ui_visible?: boolean;
silent_code?: number;
silent_bi_sub_code?: number;
silent_message?: string;
silent_status?: number;
http_status?: number;
http_event_count?: number;
};
//# sourceMappingURL=NativeResponse.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeResponse.d.ts","sourceRoot":"","sources":["../../../../src/broker/nativeBroker/NativeResponse.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,wBAAwB,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
@@ -0,0 +1,8 @@
export declare const USER_INTERACTION_REQUIRED = "USER_INTERACTION_REQUIRED";
export declare const USER_CANCEL = "USER_CANCEL";
export declare const NO_NETWORK = "NO_NETWORK";
export declare const TRANSIENT_ERROR = "TRANSIENT_ERROR";
export declare const PERSISTENT_ERROR = "PERSISTENT_ERROR";
export declare const DISABLED = "DISABLED";
export declare const ACCOUNT_UNAVAILABLE = "ACCOUNT_UNAVAILABLE";
//# sourceMappingURL=NativeStatusCodes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeStatusCodes.d.ts","sourceRoot":"","sources":["../../../../src/broker/nativeBroker/NativeStatusCodes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,mBAAmB,wBAAwB,CAAC"}
+49
View File
@@ -0,0 +1,49 @@
import { AccountInfo, AccountFilter, Logger } from "@azure/msal-common/browser";
import { BrowserCacheManager } from "./BrowserCacheManager.js";
/**
* Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
* @param accountFilter - (Optional) filter to narrow down the accounts returned
* @returns Array of AccountInfo objects in cache
*/
export declare function getAllAccounts(logger: Logger, browserStorage: BrowserCacheManager, isInBrowser: boolean, accountFilter?: AccountFilter): AccountInfo[];
/**
* Returns the first account found in the cache that matches the account filter passed in.
* @param accountFilter
* @returns The first account found in the cache matching the provided filter or null if no account could be found.
*/
export declare function getAccount(accountFilter: AccountFilter, logger: Logger, browserStorage: BrowserCacheManager): AccountInfo | null;
/**
* Returns the signed in account matching username.
* (the account object is created at the time of successful login)
* or null when no matching account is found.
* This API is provided for convenience but getAccountById should be used for best reliability
* @param username
* @returns The account object stored in MSAL
*/
export declare function getAccountByUsername(username: string, logger: Logger, browserStorage: BrowserCacheManager): AccountInfo | null;
/**
* Returns the signed in account matching homeAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param homeAccountId
* @returns The account object stored in MSAL
*/
export declare function getAccountByHomeId(homeAccountId: string, logger: Logger, browserStorage: BrowserCacheManager): AccountInfo | null;
/**
* Returns the signed in account matching localAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param localAccountId
* @returns The account object stored in MSAL
*/
export declare function getAccountByLocalId(localAccountId: string, logger: Logger, browserStorage: BrowserCacheManager): AccountInfo | null;
/**
* Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
* @param account
*/
export declare function setActiveAccount(account: AccountInfo | null, browserStorage: BrowserCacheManager): void;
/**
* Gets the currently active account
*/
export declare function getActiveAccount(browserStorage: BrowserCacheManager): AccountInfo | null;
//# sourceMappingURL=AccountManager.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"AccountManager.d.ts","sourceRoot":"","sources":["../../../src/cache/AccountManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,mBAAmB,EACnC,WAAW,EAAE,OAAO,EACpB,aAAa,CAAC,EAAE,aAAa,GAC9B,WAAW,EAAE,CAGf;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACtB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,mBAAmB,GACpC,WAAW,GAAG,IAAI,CAmBpB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,mBAAmB,GACpC,WAAW,GAAG,IAAI,CAwBpB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,mBAAmB,GACpC,WAAW,GAAG,IAAI,CAwBpB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAC/B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,mBAAmB,GACpC,WAAW,GAAG,IAAI,CAwBpB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,cAAc,EAAE,mBAAmB,GACpC,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC5B,cAAc,EAAE,mBAAmB,GACpC,WAAW,GAAG,IAAI,CAEpB"}
@@ -0,0 +1,51 @@
import { Logger } from "@azure/msal-common/browser";
import { IAsyncStorage } from "./IAsyncStorage.js";
/**
* This class allows MSAL to store artifacts asynchronously using the DatabaseStorage IndexedDB wrapper,
* backed up with the more volatile MemoryStorage object for cases in which IndexedDB may be unavailable.
*/
export declare class AsyncMemoryStorage<T> implements IAsyncStorage<T> {
private inMemoryCache;
private indexedDBCache;
private logger;
constructor(logger: Logger);
private handleDatabaseAccessError;
/**
* Get the item matching the given key. Tries in-memory cache first, then in the asynchronous
* storage object if item isn't found in-memory.
* @param key
*/
getItem(key: string): Promise<T | null>;
/**
* Sets the item in the in-memory cache and then tries to set it in the asynchronous
* storage object with the given key.
* @param key
* @param value
*/
setItem(key: string, value: T): Promise<void>;
/**
* Removes the item matching the key from the in-memory cache, then tries to remove it from the asynchronous storage object.
* @param key
*/
removeItem(key: string): Promise<void>;
/**
* Get all the keys from the in-memory cache as an iterable array of strings. If no keys are found, query the keys in the
* asynchronous storage object.
*/
getKeys(): Promise<string[]>;
/**
* Returns true or false if the given key is present in the cache.
* @param key
*/
containsKey(key: string): Promise<boolean>;
/**
* Clears in-memory Map
*/
clearInMemory(): void;
/**
* Tries to delete the IndexedDB database
* @returns
*/
clearPersistent(): Promise<boolean>;
}
//# sourceMappingURL=AsyncMemoryStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"AsyncMemoryStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/AsyncMemoryStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAMpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;GAGG;AACH,qBAAa,kBAAkB,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,aAAa,CAAmB;IACxC,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAM1B,OAAO,CAAC,yBAAyB;IAYjC;;;;OAIG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAe7C;;;;;OAKG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IASnD;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5C;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAelC;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAehD;;OAEG;IACH,aAAa,IAAI,IAAI;IAOrB;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;CAc5C"}
@@ -0,0 +1,312 @@
import { CommonAuthorizationCodeRequest, ICrypto, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, AppMetadataEntity, CacheManager, ServerTelemetryEntity, ThrottlingEntity, Logger, AuthorityMetadataEntity, AccountInfo, TokenKeys, CredentialType, CacheRecord, IPerformanceClient, StaticAuthorityOptions, StoreInCache } from "@azure/msal-common/browser";
import { CacheOptions } from "../config/Configuration.js";
import { InteractionType } from "../utils/BrowserConstants.js";
import { MemoryStorage } from "./MemoryStorage.js";
import { IWindowStorage } from "./IWindowStorage.js";
import { NativeTokenRequest } from "../broker/nativeBroker/NativeRequest.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { CookieStorage } from "./CookieStorage.js";
import { EventHandler } from "../event/EventHandler.js";
/**
* This class implements the cache storage interface for MSAL through browser local or session storage.
* Cookies are only used if storeAuthStateInCookie is true, and are only used for
* parameters such as state and nonce, generally.
*/
export declare class BrowserCacheManager extends CacheManager {
protected cacheConfig: Required<CacheOptions>;
protected browserStorage: IWindowStorage<string>;
protected internalStorage: MemoryStorage<string>;
protected temporaryCacheStorage: IWindowStorage<string>;
protected cookieStorage: CookieStorage;
protected logger: Logger;
protected performanceClient: IPerformanceClient;
private eventHandler;
constructor(clientId: string, cacheConfig: Required<CacheOptions>, cryptoImpl: ICrypto, logger: Logger, performanceClient: IPerformanceClient, eventHandler: EventHandler, staticAuthorityOptions?: StaticAuthorityOptions);
initialize(correlationId: string): Promise<void>;
/**
* Parses passed value as JSON object, JSON.parse() will throw an error.
* @param input
*/
protected validateAndParseJson(jsonValue: string): object | null;
/**
* Reads account from cache, deserializes it into an account entity and returns it.
* If account is not found from the key, returns null and removes key from map.
* @param accountKey
* @returns
*/
getAccount(accountKey: string): AccountEntity | null;
/**
* set account entity in the platform cache
* @param account
*/
setAccount(account: AccountEntity, correlationId: string): Promise<void>;
/**
* Returns the array of account keys currently cached
* @returns
*/
getAccountKeys(): Array<string>;
/**
* Add a new account to the key map
* @param key
*/
addAccountKeyToMap(key: string): boolean;
/**
* Remove an account from the key map
* @param key
*/
removeAccountKeyFromMap(key: string): void;
/**
* Extends inherited removeAccount function to include removal of the account key from the map
* @param key
*/
removeAccount(key: string): Promise<void>;
/**
* Removes credentials associated with the provided account
* @param account
*/
removeAccountContext(account: AccountEntity): Promise<void>;
/**
* Removes given idToken from the cache and from the key map
* @param key
*/
removeIdToken(key: string): void;
/**
* Removes given accessToken from the cache and from the key map
* @param key
*/
removeAccessToken(key: string): Promise<void>;
/**
* Removes given refreshToken from the cache and from the key map
* @param key
*/
removeRefreshToken(key: string): void;
/**
* Gets the keys for the cached tokens associated with this clientId
* @returns
*/
getTokenKeys(): TokenKeys;
/**
* Adds the given key to the token key map
* @param key
* @param type
*/
addTokenKey(key: string, type: CredentialType): void;
/**
* Removes the given key from the token key map
* @param key
* @param type
*/
removeTokenKey(key: string, type: CredentialType): void;
/**
* generates idToken entity from a string
* @param idTokenKey
*/
getIdTokenCredential(idTokenKey: string): IdTokenEntity | null;
/**
* set IdToken credential to the platform cache
* @param idToken
*/
setIdTokenCredential(idToken: IdTokenEntity, correlationId: string): Promise<void>;
/**
* generates accessToken entity from a string
* @param key
*/
getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null;
/**
* set accessToken credential to the platform cache
* @param accessToken
*/
setAccessTokenCredential(accessToken: AccessTokenEntity, correlationId: string): Promise<void>;
/**
* generates refreshToken entity from a string
* @param refreshTokenKey
*/
getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null;
/**
* set refreshToken credential to the platform cache
* @param refreshToken
*/
setRefreshTokenCredential(refreshToken: RefreshTokenEntity, correlationId: string): Promise<void>;
/**
* fetch appMetadata entity from the platform cache
* @param appMetadataKey
*/
getAppMetadata(appMetadataKey: string): AppMetadataEntity | null;
/**
* set appMetadata entity to the platform cache
* @param appMetadata
*/
setAppMetadata(appMetadata: AppMetadataEntity): void;
/**
* fetch server telemetry entity from the platform cache
* @param serverTelemetryKey
*/
getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null;
/**
* set server telemetry entity to the platform cache
* @param serverTelemetryKey
* @param serverTelemetry
*/
setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void;
/**
*
*/
getAuthorityMetadata(key: string): AuthorityMetadataEntity | null;
/**
*
*/
getAuthorityMetadataKeys(): Array<string>;
/**
* Sets wrapper metadata in memory
* @param wrapperSKU
* @param wrapperVersion
*/
setWrapperMetadata(wrapperSKU: string, wrapperVersion: string): void;
/**
* Returns wrapper metadata from in-memory storage
*/
getWrapperMetadata(): [string, string];
/**
*
* @param entity
*/
setAuthorityMetadata(key: string, entity: AuthorityMetadataEntity): void;
/**
* Gets the active account
*/
getActiveAccount(): AccountInfo | null;
/**
* Sets the active account's localAccountId in cache
* @param account
*/
setActiveAccount(account: AccountInfo | null): void;
/**
* fetch throttling entity from the platform cache
* @param throttlingCacheKey
*/
getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null;
/**
* set throttling entity to the platform cache
* @param throttlingCacheKey
* @param throttlingCache
*/
setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void;
/**
* Gets cache item with given key.
* Will retrieve from cookies if storeAuthStateInCookie is set to true.
* @param key
*/
getTemporaryCache(cacheKey: string, generateKey?: boolean): string | null;
/**
* Sets the cache item with the key and value given.
* Stores in cookie if storeAuthStateInCookie is set to true.
* This can cause cookie overflow if used incorrectly.
* @param key
* @param value
*/
setTemporaryCache(cacheKey: string, value: string, generateKey?: boolean): void;
/**
* Removes the cache item with the given key.
* @param key
*/
removeItem(key: string): void;
/**
* Removes the temporary cache item with the given key.
* Will also clear the cookie item if storeAuthStateInCookie is set to true.
* @param key
*/
removeTemporaryItem(key: string): void;
/**
* Gets all keys in window.
*/
getKeys(): string[];
/**
* Clears all cache entries created by MSAL.
*/
clear(): Promise<void>;
/**
* Clears all access tokes that have claims prior to saving the current one
* @param performanceClient {IPerformanceClient}
* @param correlationId {string} correlation id
* @returns
*/
clearTokensAndKeysWithClaims(performanceClient: IPerformanceClient, correlationId: string): Promise<void>;
/**
* Prepend msal.<client-id> to each key; Skip for any JSON object as Key (defined schemas do not need the key appended: AccessToken Keys or the upcoming schema)
* @param key
* @param addInstanceId
*/
generateCacheKey(key: string): string;
/**
* Create authorityKey to cache authority
* @param state
*/
generateAuthorityKey(stateString: string): string;
/**
* Create Nonce key to cache nonce
* @param state
*/
generateNonceKey(stateString: string): string;
/**
* Creates full cache key for the request state
* @param stateString State string for the request
*/
generateStateKey(stateString: string): string;
/**
* Gets the cached authority based on the cached state. Returns empty if no cached state found.
*/
getCachedAuthority(cachedState: string): string | null;
/**
* Updates account, authority, and state in cache
* @param serverAuthenticationRequest
* @param account
*/
updateCacheEntries(state: string, nonce: string, authorityInstance: string, loginHint: string, account: AccountInfo | null): void;
/**
* Reset all temporary cache items
* @param state
*/
resetRequestCache(state: string): void;
/**
* Removes temporary cache for the provided state
* @param stateString
*/
cleanRequestByState(stateString: string): void;
/**
* Looks in temporary cache for any state values with the provided interactionType and removes all temporary cache items for that state
* Used in scenarios where temp cache needs to be cleaned but state is not known, such as clicking browser back button.
* @param interactionType
*/
cleanRequestByInteractionType(interactionType: InteractionType): void;
cacheCodeRequest(authCodeRequest: CommonAuthorizationCodeRequest): void;
/**
* Gets the token exchange parameters from the cache. Throws an error if nothing is found.
*/
getCachedRequest(state: string): CommonAuthorizationCodeRequest;
/**
* Gets cached native request for redirect flows
*/
getCachedNativeRequest(): NativeTokenRequest | null;
isInteractionInProgress(matchClientId?: boolean): boolean;
getInteractionInProgress(): string | null;
setInteractionInProgress(inProgress: boolean): void;
/**
* Builds credential entities from AuthenticationResult object and saves the resulting credentials to the cache
* @param result
* @param request
*/
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
/**
* saves a cache record
* @param cacheRecord {CacheRecord}
* @param storeInCache {?StoreInCache}
* @param correlationId {?string} correlation id
*/
saveCacheRecord(cacheRecord: CacheRecord, correlationId: string, storeInCache?: StoreInCache): Promise<void>;
}
export declare const DEFAULT_BROWSER_CACHE_MANAGER: (clientId: string, logger: Logger, performanceClient: IPerformanceClient, eventHandler: EventHandler) => BrowserCacheManager;
//# sourceMappingURL=BrowserCacheManager.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BrowserCacheManager.d.ts","sourceRoot":"","sources":["../../../src/cache/BrowserCacheManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,8BAA8B,EAC9B,OAAO,EACP,aA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GAAG,MAAM;IAUjD;;;OAGG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAU7C;;;OAGG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAU7C;;OAEG;IACH,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAWtD;;;;OAIG;IACH,kBAAkB,CACd,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,WAAW,GAAG,IAAI,GAC5B,IAAI;IAqCP;;;OAGG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAoCtC;;;OAGG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAa9C;;;;OAIG;IACH,6BAA6B,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IAkCrE,gBAAgB,CAAC,eAAe,EAAE,8BAA8B,GAAG,IAAI;IAWvE;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,8BAA8B;IA4C/D;;OAEG;IACH,sBAAsB,IAAI,kBLine truncated
+16
View File
@@ -0,0 +1,16 @@
import { TokenKeys } from "@azure/msal-common/browser";
import { IWindowStorage } from "./IWindowStorage.js";
/**
* Returns a list of cache keys for all known accounts
* @param storage
* @returns
*/
export declare function getAccountKeys(storage: IWindowStorage<string>): Array<string>;
/**
* Returns a list of cache keys for all known tokens
* @param clientId
* @param storage
* @returns
*/
export declare function getTokenKeys(clientId: string, storage: IWindowStorage<string>): TokenKeys;
//# sourceMappingURL=CacheHelpers.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CacheHelpers.d.ts","sourceRoot":"","sources":["../../../src/cache/CacheHelpers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAO7E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,GAChC,SAAS,CAmBX"}
+22
View File
@@ -0,0 +1,22 @@
import { IWindowStorage } from "./IWindowStorage.js";
export declare const SameSiteOptions: {
readonly Lax: "Lax";
readonly None: "None";
};
export type SameSiteOptions = (typeof SameSiteOptions)[keyof typeof SameSiteOptions];
export declare class CookieStorage implements IWindowStorage<string> {
initialize(): Promise<void>;
getItem(key: string): string | null;
getUserData(): string | null;
setItem(key: string, value: string, cookieLifeDays?: number, secure?: boolean, sameSite?: SameSiteOptions): void;
setUserData(): Promise<void>;
removeItem(key: string): void;
getKeys(): string[];
containsKey(key: string): boolean;
}
/**
* Get cookie expiration time
* @param cookieLifeDays
*/
export declare function getCookieExpirationTime(cookieLifeDays: number): string;
//# sourceMappingURL=CookieStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CookieStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/CookieStorage.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AACX,MAAM,MAAM,eAAe,GACvB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAE3D,qBAAa,aAAc,YAAW,cAAc,CAAC,MAAM,CAAC;IACxD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAenC,WAAW,IAAI,MAAM,GAAG,IAAI;IAI5B,OAAO,CACH,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,MAAM,EACvB,MAAM,GAAE,OAAc,EACtB,QAAQ,GAAE,eAAqC,GAChD,IAAI;IAkBD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK7B,OAAO,IAAI,MAAM,EAAE;IAWnB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAGpC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAMtE"}
+57
View File
@@ -0,0 +1,57 @@
import { IAsyncStorage } from "./IAsyncStorage.js";
/**
* Storage wrapper for IndexedDB storage in browsers: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
*/
export declare class DatabaseStorage<T> implements IAsyncStorage<T> {
private db;
private dbName;
private tableName;
private version;
private dbOpen;
constructor();
/**
* Opens IndexedDB instance.
*/
open(): Promise<void>;
/**
* Closes the connection to IndexedDB database when all pending transactions
* complete.
*/
closeConnection(): void;
/**
* Opens database if it's not already open
*/
private validateDbIsOpen;
/**
* Retrieves item from IndexedDB instance.
* @param key
*/
getItem(key: string): Promise<T | null>;
/**
* Adds item to IndexedDB under given key
* @param key
* @param payload
*/
setItem(key: string, payload: T): Promise<void>;
/**
* Removes item from IndexedDB under given key
* @param key
*/
removeItem(key: string): Promise<void>;
/**
* Get all the keys from the storage object as an iterable array of strings.
*/
getKeys(): Promise<string[]>;
/**
*
* Checks whether there is an object under the search key in the object store
*/
containsKey(key: string): Promise<boolean>;
/**
* Deletes the MSAL database. The database is deleted rather than cleared to make it possible
* for client applications to downgrade to a previous MSAL version without worrying about forward compatibility issues
* with IndexedDB database versions.
*/
deleteDatabase(): Promise<boolean>;
}
//# sourceMappingURL=DatabaseStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DatabaseStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/DatabaseStorage.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAcnD;;GAEG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,CAA0B;IACpC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAU;;IASxB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B3B;;;OAGG;IACH,eAAe,IAAI,IAAI;IAQvB;;OAEG;YACW,gBAAgB;IAM9B;;;OAGG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IA+B7C;;;;OAIG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCrD;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8B5C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IA+BlC;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAgChD;;;;OAIG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;CAwB3C"}
+28
View File
@@ -0,0 +1,28 @@
export interface IAsyncStorage<T> {
/**
* Get the item from the asynchronous storage object matching the given key.
* @param key
*/
getItem(key: string): Promise<T | null>;
/**
* Sets the item in the asynchronous storage object with the given key.
* @param key
* @param value
*/
setItem(key: string, value: T): Promise<void>;
/**
* Removes the item in the asynchronous storage object matching the given key.
* @param key
*/
removeItem(key: string): Promise<void>;
/**
* Get all the keys from the asynchronous storage object as an iterable array of strings.
*/
getKeys(): Promise<string[]>;
/**
* Returns true or false if the given key is present in the cache.
* @param key
*/
containsKey(key: string): Promise<boolean>;
}
//# sourceMappingURL=IAsyncStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"IAsyncStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/IAsyncStorage.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAExC;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE7B;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9C"}
+12
View File
@@ -0,0 +1,12 @@
import { ExternalTokenResponse } from "@azure/msal-common/browser";
import { SilentRequest } from "../request/SilentRequest.js";
import { LoadTokenOptions } from "./TokenCache.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
export interface ITokenCache {
/**
* API to side-load tokens to MSAL cache
* @returns `AuthenticationResult` for the response that was loaded.
*/
loadExternalTokens(request: SilentRequest, response: ExternalTokenResponse, options: LoadTokenOptions): Promise<AuthenticationResult>;
}
//# sourceMappingURL=ITokenCache.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ITokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/ITokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,WAAW,WAAW;IACxB;;;OAGG;IACH,kBAAkB,CACd,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,gBAAgB,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACpC"}
+40
View File
@@ -0,0 +1,40 @@
export interface IWindowStorage<T> {
/**
* Async initializer
*/
initialize(correlationId: string): Promise<void>;
/**
* Get the item from the window storage object matching the given key.
* @param key
*/
getItem(key: string): T | null;
/**
* Getter for sensitive data that may contain PII.
*/
getUserData(key: string): T | null;
/**
* Sets the item in the window storage object with the given key.
* @param key
* @param value
*/
setItem(key: string, value: T): void;
/**
* Setter for sensitive data that may contain PII.
*/
setUserData(key: string, value: T, correlationId: string): Promise<void>;
/**
* Removes the item in the window storage object matching the given key.
* @param key
*/
removeItem(key: string): void;
/**
* Get all the keys from the window storage object as an iterable array of strings.
*/
getKeys(): string[];
/**
* Returns true or false if the given key is present in the cache.
* @param key
*/
containsKey(key: string): boolean;
}
//# sourceMappingURL=IWindowStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"IWindowStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/IWindowStorage.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc,CAAC,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC;IAEnC;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzE;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,OAAO,IAAI,MAAM,EAAE,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACrC"}
+49
View File
@@ -0,0 +1,49 @@
import { IPerformanceClient, Logger } from "@azure/msal-common/browser";
import { IWindowStorage } from "./IWindowStorage.js";
export declare class LocalStorage implements IWindowStorage<string> {
private clientId;
private initialized;
private memoryStorage;
private performanceClient;
private logger;
private encryptionCookie?;
private broadcast;
constructor(clientId: string, logger: Logger, performanceClient: IPerformanceClient);
initialize(correlationId: string): Promise<void>;
getItem(key: string): string | null;
getUserData(key: string): string | null;
setItem(key: string, value: string): void;
setUserData(key: string, value: string, correlationId: string): Promise<void>;
removeItem(key: string): void;
getKeys(): string[];
containsKey(key: string): boolean;
/**
* Removes all known MSAL keys from the cache
*/
clear(): void;
/**
* Helper to decrypt all known MSAL keys in localStorage and save them to inMemory storage
* @returns
*/
private importExistingCache;
/**
* Helper to decrypt and save cache entries
* @param key
* @returns
*/
private getItemFromEncryptedCache;
/**
* Helper to decrypt and save an array of cache keys
* @param arr
* @returns Array of keys successfully imported
*/
private importArray;
/**
* Gets encryption context for a given cache entry. This is clientId for app specific entries, empty string for shared entries
* @param key
* @returns
*/
private getContext;
private updateCache;
}
//# sourceMappingURL=LocalStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"LocalStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/LocalStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EAGH,kBAAkB,EAGlB,MAAM,EAET,MAAM,4BAA4B,CAAC;AAmBpC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAmBrD,qBAAa,YAAa,YAAW,cAAc,CAAC,MAAM,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,aAAa,CAAwB;IAC7C,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAC5C,OAAO,CAAC,SAAS,CAAmB;gBAGhC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,kBAAkB;IAenC,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoFtD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAInC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IASvC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAInC,WAAW,CACb,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC;IA+BhB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAY7B,OAAO,IAAI,MAAM,EAAE;IAInB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC;;OAEG;IACH,KAAK,IAAI,IAAI;IAsBb;;;OAGG;YACW,mBAAmB;IA8BjC;;;;OAIG;YACW,yBAAyB;IAqDvC;;;;OAIG;YACW,WAAW;IA0BzB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,WAAW;CAkCtB"}
+15
View File
@@ -0,0 +1,15 @@
import { IWindowStorage } from "./IWindowStorage.js";
export declare class MemoryStorage<T> implements IWindowStorage<T> {
private cache;
constructor();
initialize(): Promise<void>;
getItem(key: string): T | null;
getUserData(key: string): T | null;
setItem(key: string, value: T): void;
setUserData(key: string, value: T): Promise<void>;
removeItem(key: string): void;
getKeys(): string[];
containsKey(key: string): boolean;
clear(): void;
}
//# sourceMappingURL=MemoryStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MemoryStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/MemoryStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,aAAa,CAAC,CAAC,CAAE,YAAW,cAAc,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,KAAK,CAAiB;;IAMxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAI9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAIlC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAI9B,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,OAAO,IAAI,MAAM,EAAE;IAQnB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIjC,KAAK,IAAI,IAAI;CAGhB"}
+13
View File
@@ -0,0 +1,13 @@
import { IWindowStorage } from "./IWindowStorage.js";
export declare class SessionStorage implements IWindowStorage<string> {
constructor();
initialize(): Promise<void>;
getItem(key: string): string | null;
getUserData(key: string): string | null;
setItem(key: string, value: string): void;
setUserData(key: string, value: string): Promise<void>;
removeItem(key: string): void;
getKeys(): string[];
containsKey(key: string): boolean;
}
//# sourceMappingURL=SessionStorage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SessionStorage.d.ts","sourceRoot":"","sources":["../../../src/cache/SessionStorage.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,cAAe,YAAW,cAAc,CAAC,MAAM,CAAC;;IASnD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAInC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIvC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAInC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5D,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,OAAO,IAAI,MAAM,EAAE;IAInB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAGpC"}
+78
View File
@@ -0,0 +1,78 @@
import { ICrypto, Logger, ExternalTokenResponse } from "@azure/msal-common/browser";
import { BrowserConfiguration } from "../config/Configuration.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { BrowserCacheManager } from "./BrowserCacheManager.js";
import { ITokenCache } from "./ITokenCache.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
export type LoadTokenOptions = {
clientInfo?: string;
expiresOn?: number;
extendedExpiresOn?: number;
};
/**
* Token cache manager
*/
export declare class TokenCache implements ITokenCache {
isBrowserEnvironment: boolean;
protected config: BrowserConfiguration;
private storage;
private logger;
private cryptoObj;
constructor(configuration: BrowserConfiguration, storage: BrowserCacheManager, logger: Logger, cryptoObj: ICrypto);
/**
* API to load tokens to msal-browser cache.
* @param request
* @param response
* @param options
* @returns `AuthenticationResult` for the response that was loaded.
*/
loadExternalTokens(request: SilentRequest, response: ExternalTokenResponse, options: LoadTokenOptions): Promise<AuthenticationResult>;
/**
* Helper function to load account to msal-browser cache
* @param idToken
* @param environment
* @param clientInfo
* @param authorityType
* @param requestHomeAccountId
* @returns `AccountEntity`
*/
private loadAccount;
/**
* Helper function to load id tokens to msal-browser cache
* @param idToken
* @param homeAccountId
* @param environment
* @param tenantId
* @returns `IdTokenEntity`
*/
private loadIdToken;
/**
* Helper function to load access tokens to msal-browser cache
* @param request
* @param response
* @param homeAccountId
* @param environment
* @param tenantId
* @returns `AccessTokenEntity`
*/
private loadAccessToken;
/**
* Helper function to load refresh tokens to msal-browser cache
* @param request
* @param response
* @param homeAccountId
* @param environment
* @returns `RefreshTokenEntity`
*/
private loadRefreshToken;
/**
* Helper function to generate an `AuthenticationResult` for the result.
* @param request
* @param idTokenObj
* @param cacheRecord
* @param authority
* @returns `AuthenticationResult`
*/
private generateAuthenticationResult;
}
//# sourceMappingURL=TokenCache.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"TokenCache.d.ts","sourceRoot":"","sources":["../../../src/cache/TokenCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAEH,OAAO,EAEP,MAAM,EAIN,qBAAqB,EAQxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAK/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAI3E,MAAM,MAAM,gBAAgB,GAAG;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,YAAW,WAAW;IAEnC,oBAAoB,EAAE,OAAO,CAAC;IAErC,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAEvC,OAAO,CAAC,OAAO,CAAsB;IAErC,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,SAAS,CAAU;gBAGvB,aAAa,EAAE,oBAAoB,EACnC,OAAO,EAAE,mBAAmB,EAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,OAAO;IAWtB;;;;;;OAMG;IACG,kBAAkB,CACpB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,gBAAgB,GAC1B,OAAO,CAAC,oBAAoB,CAAC;IAkFhC;;;;;;;;OAQG;YACW,WAAW;IAoDzB;;;;;;;OAOG;YACW,WAAW;IAyBzB;;;;;;;;OAQG;YACW,eAAe;IA8D7B;;;;;;;OAOG;YACW,gBAAgB;IA+B9B;;;;;;;OAOG;IACH,OAAO,CAAC,4BAA4B;CAgDvC"}
+219
View File
@@ -0,0 +1,219 @@
import { SystemOptions, LoggerOptions, INetworkModule, ProtocolMode, OIDCOptions, AzureCloudOptions, ApplicationTelemetry, IPerformanceClient } from "@azure/msal-common/browser";
import { BrowserCacheLocation } from "../utils/BrowserConstants.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
export declare const DEFAULT_POPUP_TIMEOUT_MS = 60000;
export declare const DEFAULT_IFRAME_TIMEOUT_MS = 10000;
export declare const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;
export declare const DEFAULT_NATIVE_BROKER_HANDSHAKE_TIMEOUT_MS = 2000;
/**
* Use this to configure the auth options in the Configuration object
*/
export type BrowserAuthOptions = {
/**
* Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform
*/
clientId: string;
/**
* You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
*/
authority?: string;
/**
* An array of URIs that are known to be valid. Used in B2C scenarios.
*/
knownAuthorities?: Array<string>;
/**
* A string containing the cloud discovery response. Used in AAD scenarios.
*/
cloudDiscoveryMetadata?: string;
/**
* A string containing the .well-known/openid-configuration endpoint response
*/
authorityMetadata?: string;
/**
* The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
*/
redirectUri?: string;
/**
* The redirect URI where the window navigates after a successful logout.
*/
postLogoutRedirectUri?: string | null;
/**
* Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.
*/
navigateToLoginRequestUrl?: boolean;
/**
* Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
*/
clientCapabilities?: Array<string>;
/**
* Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
*/
protocolMode?: ProtocolMode;
/**
* Enum that configures options for the OIDC protocol mode.
*/
OIDCOptions?: OIDCOptions;
/**
* Enum that represents the Azure Cloud to use.
*/
azureCloudOptions?: AzureCloudOptions;
/**
* Flag of whether to use the local metadata cache
*/
skipAuthorityMetadataCache?: boolean;
/**
* App supports nested app auth or not; defaults to
*
* @deprecated This flag is deprecated and will be removed in the next major version. createNestablePublicClientApplication should be used instead.
*/
supportsNestedAppAuth?: boolean;
/**
* Callback that will be passed the url that MSAL will navigate to in redirect flows. Returning false in the callback will stop navigation.
*/
onRedirectNavigate?: (url: string) => boolean | void;
/**
* Flag of whether the STS will send back additional parameters to specify where the tokens should be retrieved from.
*/
instanceAware?: boolean;
};
/** @internal */
export type InternalAuthOptions = Omit<Required<BrowserAuthOptions>, "onRedirectNavigate"> & {
OIDCOptions: Required<OIDCOptions>;
onRedirectNavigate?: (url: string) => boolean | void;
};
/**
* Use this to configure the below cache configuration options:
*/
export type CacheOptions = {
/**
* Used to specify the cacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
*/
cacheLocation?: BrowserCacheLocation | string;
/**
* Used to specify the temporaryCacheLocation user wants to set. Valid values are "localStorage", "sessionStorage" and "memoryStorage".
*/
temporaryCacheLocation?: BrowserCacheLocation | string;
/**
* If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.
*/
storeAuthStateInCookie?: boolean;
/**
* If set, MSAL sets the "Secure" flag on cookies so they can only be sent over HTTPS. By default this flag is set to true.
* @deprecated This option will be removed in a future major version and all cookies set will include the Secure attribute.
*/
secureCookies?: boolean;
/**
* If set, MSAL will attempt to migrate cache entries from older versions on initialization. By default this flag is set to true if cacheLocation is localStorage, otherwise false.
*/
cacheMigrationEnabled?: boolean;
/**
* Flag that determines whether access tokens are stored based on requested claims
*/
claimsBasedCachingEnabled?: boolean;
};
export type BrowserSystemOptions = SystemOptions & {
/**
* Used to initialize the Logger object (See ClientConfiguration.ts)
*/
loggerOptions?: LoggerOptions;
/**
* Network interface implementation
*/
networkClient?: INetworkModule;
/**
* Override the methods used to navigate to other webpages. Particularly useful if you are using a client-side router
*/
navigationClient?: INavigationClient;
/**
* Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.
*/
windowHashTimeout?: number;
/**
* Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.
*/
iframeHashTimeout?: number;
/**
* Sets the timeout for waiting for a response hash in an iframe or popup
*/
loadFrameTimeout?: number;
/**
* Maximum time the library should wait for a frame to load
* @deprecated This was previously needed for older browsers which are no longer supported by MSAL.js. This option will be removed in the next major version
*/
navigateFrameWait?: number;
/**
* Time to wait for redirection to occur before resolving promise
*/
redirectNavigationTimeout?: number;
/**
* Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.
*/
asyncPopups?: boolean;
/**
* Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).
*/
allowRedirectInIframe?: boolean;
/**
* Flag to enable native broker support (e.g. acquiring tokens from WAM on Windows, MacBroker on Mac)
*/
allowPlatformBroker?: boolean;
/**
* Sets the timeout for waiting for the native broker handshake to resolve
*/
nativeBrokerHandshakeTimeout?: number;
/**
* Sets the interval length in milliseconds for polling the location attribute in popup windows (default is 30ms)
*/
pollIntervalMilliseconds?: number;
};
/**
* Telemetry Options
*/
export type BrowserTelemetryOptions = {
/**
* Telemetry information sent on request
* - appName: Unique string name of an application
* - appVersion: Version of the application using MSAL
*/
application?: ApplicationTelemetry;
client?: IPerformanceClient;
};
/**
* This object allows you to configure important elements of MSAL functionality and is passed into the constructor of PublicClientApplication
*/
export type Configuration = {
/**
* This is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
*/
auth: BrowserAuthOptions;
/**
* This is where you configure cache location and whether to store cache in cookies
*/
cache?: CacheOptions;
/**
* This is where you can configure the network client, logger, token renewal offset
*/
system?: BrowserSystemOptions;
/**
* This is where you can configure telemetry data and options
*/
telemetry?: BrowserTelemetryOptions;
};
/** @internal */
export type BrowserConfiguration = {
auth: InternalAuthOptions;
cache: Required<CacheOptions>;
system: Required<BrowserSystemOptions>;
telemetry: Required<BrowserTelemetryOptions>;
};
/**
* MSAL function that sets the default options when not explicitly configured from app developer
*
* @param auth
* @param cache
* @param system
*
* @returns Configuration object
*/
export declare function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem, telemetry: userInputTelemetry, }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration;
//# sourceMappingURL=Configuration.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../../src/config/Configuration.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,aAAa,EACb,cAAc,EAGd,YAAY,EACZ,WAAW,EAKX,iBAAiB,EACjB,oBAAoB,EAGpB,kBAAkB,EAGrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,oBAAoB,EAEvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAMvE,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAC9C,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAC/C,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AACjD,eAAO,MAAM,0CAA0C,OAAO,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B;;OAEG;IACH,QAAQ,EAAE,M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IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,oBAAoB,GAAG;IAC/B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC9B,MAAM,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IACvC,SAAS,EAAE,QAAQ,CAAC,uBAAuB,CAAC,CAAC;CAChD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAC9B,EACI,IAAI,EAAE,aAAa,EACnB,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,eAAe,EACvB,SAAS,EAAE,kBAAkB,GAChC,EAAE,aAAa,EAChB,oBAAoB,EAAE,OAAO,GAC9B,oBAAoB,CAwItB"}
@@ -0,0 +1,6 @@
import { IController } from "./IController.js";
import { Configuration } from "../config/Configuration.js";
import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
export declare function createV3Controller(config: Configuration, request?: InitializeApplicationRequest): Promise<IController>;
export declare function createController(config: Configuration): Promise<IController | null>;
//# sourceMappingURL=ControllerFactory.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ControllerFactory.d.ts","sourceRoot":"","sources":["../../../src/controllers/ControllerFactory.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAE1F,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,4BAA4B,GACvC,OAAO,CAAC,WAAW,CAAC,CAKtB;AAED,wBAAsB,gBAAgB,CAClC,MAAM,EAAE,aAAa,GACtB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAgB7B"}
@@ -0,0 +1,59 @@
import { AccountInfo, Logger, PerformanceCallbackFunction, IPerformanceClient, AccountFilter } from "@azure/msal-common/browser";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { ApiId, WrapperSKU } from "../utils/BrowserConstants.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { ITokenCache } from "../cache/ITokenCache.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
import { EventType } from "../event/EventType.js";
export interface IController {
initialize(request?: InitializeApplicationRequest): Promise<void>;
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
acquireTokenNative(request: PopupRequest | SilentRequest | SsoSilentRequest, apiId: ApiId, accountId?: string): Promise<AuthenticationResult>;
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
removeEventCallback(callbackId: string): void;
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
removePerformanceCallback(callbackId: string): boolean;
enableAccountStorageEvents(): void;
disableAccountStorageEvents(): void;
getAccount(accountFilter: AccountFilter): AccountInfo | null;
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
getAccountByLocalId(localId: string): AccountInfo | null;
getAccountByUsername(userName: string): AccountInfo | null;
getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;
loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
loginRedirect(request?: RedirectRequest): Promise<void>;
logout(logoutRequest?: EndSessionRequest): Promise<void>;
logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
getTokenCache(): ITokenCache;
getLogger(): Logger;
setLogger(logger: Logger): void;
setActiveAccount(account: AccountInfo | null): void;
getActiveAccount(): AccountInfo | null;
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
setNavigationClient(navigationClient: INavigationClient): void;
/** @internal */
getConfiguration(): BrowserConfiguration;
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
/** @internal */
isBrowserEnv(): boolean;
/** @internal */
getPerformanceClient(): IPerformanceClient;
}
//# sourceMappingURL=IController.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"IController.d.ts","sourceRoot":"","sources":["../../../src/controllers/IController.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,WAAW,EACX,MAAM,EACN,2BAA2B,EAC3B,kBAAkB,EAClB,aAAa,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,U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B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEpE,aAAa,IAAI,WAAW,CAAC;IAE7B,SAAS,IAAI,MAAM,CAAC;IAEpB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;IAEpD,gBAAgB,IAAI,WAAW,GAAG,IAAI,CAAC;IAEvC,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjE,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAE/D,gBAAgB;IAChB,gBAAgB,IAAI,oBAAoB,CAAC;IAEzC,YAAY,CACR,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB,gBAAgB;IAChB,YAAY,IAAI,OAAO,CAAC;IAExB,gBAAgB;IAChB,oBAAoB,IAAI,kBAAkB,CAAC;CAC9C"}
@@ -0,0 +1,203 @@
import { CommonAuthorizationUrlRequest, CommonSilentFlowRequest, PerformanceCallbackFunction, AccountInfo, Logger, ICrypto, IPerformanceClient, AccountFilter } from "@azure/msal-common/browser";
import { ITokenCache } from "../cache/ITokenCache.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { ApiId, WrapperSKU } from "../utils/BrowserConstants.js";
import { IController } from "./IController.js";
import { NestedAppOperatingContext } from "../operatingcontext/NestedAppOperatingContext.js";
import { IBridgeProxy } from "../naa/IBridgeProxy.js";
import { NestedAppAuthAdapter } from "../naa/mapping/NestedAppAuthAdapter.js";
import { EventHandler } from "../event/EventHandler.js";
import { EventType } from "../event/EventType.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { AccountContext } from "../naa/BridgeAccountContext.js";
import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
export declare class NestedAppAuthController implements IController {
protected readonly operatingContext: NestedAppOperatingContext;
protected readonly bridgeProxy: IBridgeProxy;
protected readonly browserCrypto: ICrypto;
protected readonly config: BrowserConfiguration;
protected readonly browserStorage: BrowserCacheManager;
protected logger: Logger;
protected readonly performanceClient: IPerformanceClient;
protected readonly eventHandler: EventHandler;
protected readonly nestedAppAuthAdapter: NestedAppAuthAdapter;
protected currentAccountContext: AccountContext | null;
constructor(operatingContext: NestedAppOperatingContext);
/**
* Factory function to create a new instance of NestedAppAuthController
* @param operatingContext
* @returns Promise<IController>
*/
static createController(operatingContext: NestedAppOperatingContext): Promise<IController>;
/**
* Specific implementation of initialize function for NestedAppAuthController
* @returns
*/
initialize(request?: InitializeApplicationRequest): Promise<void>;
/**
* Validate the incoming request and add correlationId if not present
* @param request
* @returns
*/
private ensureValidRequest;
/**
* Internal implementation of acquireTokenInteractive flow
* @param request
* @returns
*/
private acquireTokenInteractive;
/**
* Internal implementation of acquireTokenSilent flow
* @param request
* @returns
*/
private acquireTokenSilentInternal;
/**
* acquires tokens from cache
* @param request
* @returns
*/
private acquireTokenFromCache;
/**
*
* @param request
* @returns
*/
private acquireTokenFromCacheInternal;
/**
* acquireTokenPopup flow implementation
* @param request
* @returns
*/
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
/**
* acquireTokenRedirect flow is not supported in nested app auth
* @param request
*/
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
/**
* acquireTokenSilent flow implementation
* @param silentRequest
* @returns
*/
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
/**
* Hybrid flow is not currently supported in nested app auth
* @param request
*/
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
/**
* acquireTokenNative flow is not currently supported in nested app auth
* @param request
* @param apiId
* @param accountId
*/
acquireTokenNative(request: SilentRequest | Partial<Omit<CommonAuthorizationUrlRequest, "requestedClaimsHash" | "responseMode" | "codeChallenge" | "codeChallengeMethod" | "platformBroker">> | PopupRequest, apiId: ApiId, // eslint-disable-line @typescript-eslint/no-unused-vars
accountId?: string | undefined): Promise<AuthenticationResult>;
/**
* acquireTokenByRefreshToken flow is not currently supported in nested app auth
* @param commonRequest
* @param silentRequest
*/
acquireTokenByRefreshToken(commonRequest: CommonSilentFlowRequest, // eslint-disable-line @typescript-eslint/no-unused-vars
silentRequest: SilentRequest): Promise<AuthenticationResult>;
/**
* Adds event callbacks to array
* @param callback
* @param eventTypes
*/
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
/**
* Removes callback with provided id from callback array
* @param callbackId
*/
removeEventCallback(callbackId: string): void;
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
removePerformanceCallback(callbackId: string): boolean;
enableAccountStorageEvents(): void;
disableAccountStorageEvents(): void;
/**
* Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
* @param accountFilter - (Optional) filter to narrow down the accounts returned
* @returns Array of AccountInfo objects in cache
*/
getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
/**
* Returns the first account found in the cache that matches the account filter passed in.
* @param accountFilter
* @returns The first account found in the cache matching the provided filter or null if no account could be found.
*/
getAccount(accountFilter: AccountFilter): AccountInfo | null;
/**
* Returns the signed in account matching username.
* (the account object is created at the time of successful login)
* or null when no matching account is found.
* This API is provided for convenience but getAccountById should be used for best reliability
* @param username
* @returns The account object stored in MSAL
*/
getAccountByUsername(username: string): AccountInfo | null;
/**
* Returns the signed in account matching homeAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param homeAccountId
* @returns The account object stored in MSAL
*/
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
/**
* Returns the signed in account matching localAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param localAccountId
* @returns The account object stored in MSAL
*/
getAccountByLocalId(localAccountId: string): AccountInfo | null;
/**
* Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
* @param account
*/
setActiveAccount(account: AccountInfo | null): void;
/**
* Gets the currently active account
*/
getActiveAccount(): AccountInfo | null;
handleRedirectPromise(hash?: string | undefined): Promise<AuthenticationResult | null>;
loginPopup(request?: PopupRequest | undefined): Promise<AuthenticationResult>;
loginRedirect(request?: RedirectRequest | undefined): Promise<void>;
logout(logoutRequest?: EndSessionRequest | undefined): Promise<void>;
logoutRedirect(logoutRequest?: EndSessionRequest | undefined): Promise<void>;
logoutPopup(logoutRequest?: EndSessionPopupRequest | undefined): Promise<void>;
ssoSilent(request: Partial<Omit<CommonAuthorizationUrlRequest, "requestedClaimsHash" | "responseMode" | "codeChallenge" | "codeChallengeMethod" | "platformBroker">>): Promise<AuthenticationResult>;
getTokenCache(): ITokenCache;
/**
* Returns the logger instance
*/
getLogger(): Logger;
/**
* Replaces the default logger set in configurations with new Logger with new configurations
* @param logger Logger instance
*/
setLogger(logger: Logger): void;
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
setNavigationClient(navigationClient: INavigationClient): void;
getConfiguration(): BrowserConfiguration;
isBrowserEnv(): boolean;
getBrowserCrypto(): ICrypto;
getPerformanceClient(): IPerformanceClient;
getRedirectResponse(): Map<string, Promise<AuthenticationResult | null>>;
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
}
//# sourceMappingURL=NestedAppAuthController.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NestedAppAuthController.d.ts","sourceRoot":"","sources":["../../../src/controllers/NestedAppAuthController.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,MAAM,EACN,OAAO,EACP,kBAAkB,EAQlB,aAAa,EAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACH,KAAK,EACL,UAAU,EAIb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAc,MAAM,0BAA0B,CAAC;A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H,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAShE,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI;IAM9D,gBAAgB,IAAI,oBAAoB;IAIxC,YAAY,IAAI,OAAO;IAIvB,gBAAgB,IAAI,OAAO;IAI3B,oBAAoB,IAAI,kBAAkB;IAI1C,mBAAmB,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAKlE,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI5D,YAAY,CACd,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;CAcnB"}
@@ -0,0 +1,416 @@
import { AccountInfo, INetworkModule, Logger, CommonSilentFlowRequest, ICrypto, PerformanceCallbackFunction, IPerformanceClient, BaseAuthRequest, AccountFilter } from "@azure/msal-common/browser";
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { ApiId, WrapperSKU, CacheLookupPolicy } from "../utils/BrowserConstants.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { EventType } from "../event/EventType.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { EventHandler } from "../event/EventHandler.js";
import { PopupClient } from "../interaction_client/PopupClient.js";
import { RedirectClient } from "../interaction_client/RedirectClient.js";
import { SilentIframeClient } from "../interaction_client/SilentIframeClient.js";
import { SilentRefreshClient } from "../interaction_client/SilentRefreshClient.js";
import { ITokenCache } from "../cache/ITokenCache.js";
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SilentCacheClient } from "../interaction_client/SilentCacheClient.js";
import { SilentAuthCodeClient } from "../interaction_client/SilentAuthCodeClient.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { StandardOperatingContext } from "../operatingcontext/StandardOperatingContext.js";
import { BaseOperatingContext } from "../operatingcontext/BaseOperatingContext.js";
import { IController } from "./IController.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { InitializeApplicationRequest } from "../request/InitializeApplicationRequest.js";
export declare class StandardController implements IController {
protected readonly operatingContext: StandardOperatingContext;
protected readonly browserCrypto: ICrypto;
protected readonly browserStorage: BrowserCacheManager;
protected readonly nativeInternalStorage: BrowserCacheManager;
protected readonly networkClient: INetworkModule;
protected navigationClient: INavigationClient;
protected readonly config: BrowserConfiguration;
private tokenCache;
protected logger: Logger;
protected isBrowserEnvironment: boolean;
protected readonly eventHandler: EventHandler;
protected readonly redirectResponse: Map<string, Promise<AuthenticationResult | null>>;
protected nativeExtensionProvider: NativeMessageHandler | undefined;
private hybridAuthCodeResponses;
protected readonly performanceClient: IPerformanceClient;
protected initialized: boolean;
private activeSilentTokenRequests;
private activeIframeRequest;
private ssoSilentMeasurement?;
private acquireTokenByCodeAsyncMeasurement?;
private pkceCode;
/**
* @constructor
* Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object
*
* Important attributes in the Configuration object for auth are:
* - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview
* - authority: the authority URL for your application.
* - redirect_uri: the uri of your application registered in the portal.
*
* In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.
* It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}
* If your application supports Accounts in one organizational directory, replace "Enter_the_Tenant_Info_Here" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).
* If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
* If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
* To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
*
* In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/
* Full B2C functionality will be available in this library in future versions.
*
* @param configuration Object for the MSAL PublicClientApplication instance
*/
constructor(operatingContext: StandardOperatingContext);
static createController(operatingContext: BaseOperatingContext, request?: InitializeApplicationRequest): Promise<IController>;
private trackPageVisibility;
/**
* Initializer function to perform async startup tasks such as connecting to WAM extension
* @param request {?InitializeApplicationRequest} correlation id
*/
initialize(request?: InitializeApplicationRequest): Promise<void>;
/**
* Event handler function which allows users to fire events after the PublicClientApplication object
* has loaded during redirect flows. This should be invoked on all page loads involved in redirect
* auth flows.
* @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.
* @returns Token response or null. If the return value is null, then no auth redirect was detected.
*/
handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;
/**
* The internal details of handleRedirectPromise. This is separated out to a helper to allow handleRedirectPromise to memoize requests
* @param hash
* @returns
*/
private handleRedirectPromiseInternal;
/**
* Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects
* the page, so any code that follows this function will not execute.
*
* IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
* browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
*
* @param request
*/
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
/**
* Use when you want to obtain an access_token for your API via opening a popup window in the user's browser
*
* @param request
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
private trackPageVisibilityWithMeasurement;
/**
* This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:
* - Any browser using a form of Intelligent Tracking Prevention
* - If there is not an established session with the service
*
* In these cases, the request must be done inside a popup or full frame redirect.
*
* For the cases where interaction is required, you cannot send a request with prompt=none.
*
* If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as
* you session on the server still exists.
* @param request {@link SsoSilentRequest}
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;
/**
* This function redeems an authorization code (passed as code) from the eSTS token endpoint.
* This authorization code should be acquired server-side using a confidential client to acquire a spa_code.
* This API is not indended for normal authorization code acquisition and redemption.
*
* Redemption of this authorization code will not require PKCE, as it was acquired by a confidential client.
*
* @param request {@link AuthorizationCodeRequest}
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
/**
* Creates a SilentAuthCodeClient to redeem an authorization code.
* @param request
* @returns Result of the operation to redeem the authorization code
*/
private acquireTokenByCodeAsync;
/**
* Attempt to acquire an access token from the cache
* @param silentCacheClient SilentCacheClient
* @param commonRequest CommonSilentFlowRequest
* @param silentRequest SilentRequest
* @returns A promise that, when resolved, returns the access token
*/
protected acquireTokenFromCache(commonRequest: CommonSilentFlowRequest, cacheLookupPolicy: CacheLookupPolicy): Promise<AuthenticationResult>;
/**
* Attempt to acquire an access token via a refresh token
* @param commonRequest CommonSilentFlowRequest
* @param cacheLookupPolicy CacheLookupPolicy
* @returns A promise that, when resolved, returns the access token
*/
acquireTokenByRefreshToken(commonRequest: CommonSilentFlowRequest, cacheLookupPolicy: CacheLookupPolicy): Promise<AuthenticationResult>;
/**
* Attempt to acquire an access token via an iframe
* @param request CommonSilentFlowRequest
* @returns A promise that, when resolved, returns the access token
*/
protected acquireTokenBySilentIframe(request: CommonSilentFlowRequest): Promise<AuthenticationResult>;
/**
* Deprecated logout function. Use logoutRedirect or logoutPopup instead
* @param logoutRequest
* @deprecated
*/
logout(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* 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`.
* @param logoutRequest
*/
logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;
/**
* Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server
* @param logoutRequest
*/
logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;
/**
* Creates a cache interaction client to clear broswer cache.
* @param logoutRequest
*/
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
/**
* Returns all the accounts in the cache that match the optional filter. If no filter is provided, all accounts are returned.
* @param accountFilter - (Optional) filter to narrow down the accounts returned
* @returns Array of AccountInfo objects in cache
*/
getAllAccounts(accountFilter?: AccountFilter): AccountInfo[];
/**
* Returns the first account found in the cache that matches the account filter passed in.
* @param accountFilter
* @returns The first account found in the cache matching the provided filter or null if no account could be found.
*/
getAccount(accountFilter: AccountFilter): AccountInfo | null;
/**
* Returns the signed in account matching username.
* (the account object is created at the time of successful login)
* or null when no matching account is found.
* This API is provided for convenience but getAccountById should be used for best reliability
* @param username
* @returns The account object stored in MSAL
*/
getAccountByUsername(username: string): AccountInfo | null;
/**
* Returns the signed in account matching homeAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param homeAccountId
* @returns The account object stored in MSAL
*/
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
/**
* Returns the signed in account matching localAccountId.
* (the account object is created at the time of successful login)
* or null when no matching account is found
* @param localAccountId
* @returns The account object stored in MSAL
*/
getAccountByLocalId(localAccountId: string): AccountInfo | null;
/**
* Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.
* @param account
*/
setActiveAccount(account: AccountInfo | null): void;
/**
* Gets the currently active account
*/
getActiveAccount(): AccountInfo | null;
/**
* Hydrates the cache with the tokens from an AuthenticationResult
* @param result
* @param request
* @returns
*/
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
/**
* Acquire a token from native device (e.g. WAM)
* @param request
*/
acquireTokenNative(request: PopupRequest | SilentRequest | SsoSilentRequest, apiId: ApiId, accountId?: string, cacheLookupPolicy?: CacheLookupPolicy): Promise<AuthenticationResult>;
/**
* Returns boolean indicating if this request can use the platform broker
* @param request
*/
canUsePlatformBroker(request: RedirectRequest | PopupRequest | SsoSilentRequest, accountId?: string): boolean;
/**
* Get the native accountId from the account
* @param request
* @returns
*/
getNativeAccountId(request: RedirectRequest | PopupRequest | SsoSilentRequest): string;
/**
* Returns new instance of the Popup Interaction Client
* @param correlationId
*/
createPopupClient(correlationId?: string): PopupClient;
/**
* Returns new instance of the Redirect Interaction Client
* @param correlationId
*/
protected createRedirectClient(correlationId?: string): RedirectClient;
/**
* Returns new instance of the Silent Iframe Interaction Client
* @param correlationId
*/
createSilentIframeClient(correlationId?: string): SilentIframeClient;
/**
* Returns new instance of the Silent Cache Interaction Client
*/
protected createSilentCacheClient(correlationId?: string): SilentCacheClient;
/**
* Returns new instance of the Silent Refresh Interaction Client
*/
protected createSilentRefreshClient(correlationId?: string): SilentRefreshClient;
/**
* Returns new instance of the Silent AuthCode Interaction Client
*/
protected createSilentAuthCodeClient(correlationId?: string): SilentAuthCodeClient;
/**
* Adds event callbacks to array
* @param callback
*/
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
/**
* Removes callback with provided id from callback array
* @param callbackId
*/
removeEventCallback(callbackId: string): void;
/**
* Registers a callback to receive performance events.
*
* @param {PerformanceCallbackFunction} callback
* @returns {string}
*/
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
/**
* Removes a callback registered with addPerformanceCallback.
*
* @param {string} callbackId
* @returns {boolean}
*/
removePerformanceCallback(callbackId: string): boolean;
/**
* Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
* @deprecated These events will be raised by default and this method will be removed in a future major version.
*/
enableAccountStorageEvents(): void;
/**
* Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window
* @deprecated These events will be raised by default and this method will be removed in a future major version.
*/
disableAccountStorageEvents(): void;
/**
* Gets the token cache for the application.
*/
getTokenCache(): ITokenCache;
/**
* Returns the logger instance
*/
getLogger(): Logger;
/**
* Replaces the default logger set in configurations with new Logger with new configurations
* @param logger Logger instance
*/
setLogger(logger: Logger): void;
/**
* Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.
* @param sku
* @param version
*/
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
/**
* Sets navigation client
* @param navigationClient
*/
setNavigationClient(navigationClient: INavigationClient): void;
/**
* Returns the configuration object
*/
getConfiguration(): BrowserConfiguration;
/**
* Returns the performance client
*/
getPerformanceClient(): IPerformanceClient;
/**
* Returns the browser env indicator
*/
isBrowserEnv(): boolean;
/**
* Generates a correlation id for a request if none is provided.
*
* @protected
* @param {?Partial<BaseAuthRequest>} [request]
* @returns {string}
*/
protected getRequestCorrelationId(request?: Partial<BaseAuthRequest>): string;
/**
* Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so
* any code that follows this function will not execute.
*
* IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current
* browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.
*
* @param request
*/
loginRedirect(request?: RedirectRequest): Promise<void>;
/**
* Use when initiating the login process via opening a popup window in the user's browser
*
* @param request
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;
/**
* Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.
*
* @param {@link (SilentRequest:type)}
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object
*/
acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult>;
/**
* Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.
* @param {@link (SilentRequest:type)}
* @param {@link (AccountInfo:type)}
* @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse}
*/
protected acquireTokenSilentAsync(request: SilentRequest & {
correlationId: string;
}, account: AccountInfo): Promise<AuthenticationResult>;
/**
* AcquireTokenSilent without the iframe fallback. This is used to enable the correct fallbacks in cases where there's a potential for multiple silent requests to be made in parallel and prevent those requests from making concurrent iframe requests.
* @param silentRequest
* @param cacheLookupPolicy
* @returns
*/
private acquireTokenSilentNoIframe;
/**
* Pre-generates PKCE codes and stores it in local variable
* @param correlationId
*/
private preGeneratePkceCodes;
/**
* Provides pre-generated PKCE codes, if any
* @param correlationId
*/
private getPreGeneratedPkceCodes;
}
//# sourceMappingURL=StandardController.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"StandardController.d.ts","sourceRoot":"","sources":["../../../src/controllers/StandardController.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,WAAW,EAEX,cAAc,EACd,MAAM,EACN,uBAAuB,EACvB,OAAO,EAIP,2BAA2B,EAC3B,kBAAkB,EAClB,eAAe,EAQf,aAAa,EAIhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,mBAAmB,EAEtB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAgB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAEH,KAAK,EAEL,UAAU,EAEV,iBAAiB,EAIpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAc,M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AC,EAAE,MAAM,GAAG,WAAW;IAe7D;;;OAGG;IACH,SAAS,CAAC,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,cAAc;IAetE;;;OAGG;IACI,wBAAwB,CAC3B,aAAa,CAAC,EAAE,MAAM,GACvB,kBAAkB;IAgBrB;;OAEG;IACH,SAAS,CAAC,uBAAuB,CAC7B,aAAa,CAAC,EAAE,MAAM,GACvB,iBAAiB;IAcpB;;OAEG;ILine truncated
@@ -0,0 +1,86 @@
import { CommonAuthorizationUrlRequest, CommonSilentFlowRequest, PerformanceCallbackFunction, AccountInfo, Logger, ICrypto, IPerformanceClient, AccountFilter } from "@azure/msal-common/browser";
import { ITokenCache } from "../cache/ITokenCache.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { AuthorizationCodeRequest } from "../request/AuthorizationCodeRequest.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { ApiId, WrapperSKU } from "../utils/BrowserConstants.js";
import { IController } from "./IController.js";
import { UnknownOperatingContext } from "../operatingcontext/UnknownOperatingContext.js";
import { EventCallbackFunction } from "../event/EventMessage.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
import { EventType } from "../event/EventType.js";
/**
* UnknownOperatingContextController class
*
* - Until initialize method is called, this controller is the default
* - AFter initialize method is called, this controller will be swapped out for the appropriate controller
* if the operating context can be determined; otherwise this controller will continued be used
*
* - Why do we have this? We don't want to dynamically import (download) all of the code in StandardController if we don't need to.
*
* - Only includes implementation for getAccounts and handleRedirectPromise
* - All other methods are will throw initialization error (because either initialize method or the factory method were not used)
* - This controller is necessary for React Native wrapper, server side rendering and any other scenario where we don't have a DOM
*
*/
export declare class UnknownOperatingContextController implements IController {
protected readonly operatingContext: UnknownOperatingContext;
protected logger: Logger;
protected readonly browserStorage: BrowserCacheManager;
protected readonly config: BrowserConfiguration;
protected readonly performanceClient: IPerformanceClient;
private readonly eventHandler;
protected readonly browserCrypto: ICrypto;
protected isBrowserEnvironment: boolean;
protected initialized: boolean;
constructor(operatingContext: UnknownOperatingContext);
getBrowserStorage(): BrowserCacheManager;
getAccount(accountFilter: AccountFilter): AccountInfo | null;
getAccountByHomeId(homeAccountId: string): AccountInfo | null;
getAccountByLocalId(localAccountId: string): AccountInfo | null;
getAccountByUsername(username: string): AccountInfo | null;
getAllAccounts(): AccountInfo[];
initialize(): Promise<void>;
acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
acquireTokenRedirect(request: RedirectRequest): Promise<void>;
acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult>;
acquireTokenNative(request: PopupRequest | SilentRequest | Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>, apiId: ApiId, accountId?: string | undefined): Promise<AuthenticationResult>;
acquireTokenByRefreshToken(commonRequest: CommonSilentFlowRequest, silentRequest: SilentRequest): Promise<AuthenticationResult>;
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>): string | null;
removeEventCallback(callbackId: string): void;
addPerformanceCallback(callback: PerformanceCallbackFunction): string;
removePerformanceCallback(callbackId: string): boolean;
enableAccountStorageEvents(): void;
disableAccountStorageEvents(): void;
handleRedirectPromise(hash?: string | undefined): Promise<AuthenticationResult | null>;
loginPopup(request?: PopupRequest | undefined): Promise<AuthenticationResult>;
loginRedirect(request?: RedirectRequest | undefined): Promise<void>;
logout(logoutRequest?: EndSessionRequest | undefined): Promise<void>;
logoutRedirect(logoutRequest?: EndSessionRequest | undefined): Promise<void>;
logoutPopup(logoutRequest?: EndSessionPopupRequest | undefined): Promise<void>;
ssoSilent(request: Partial<Omit<CommonAuthorizationUrlRequest, "responseMode" | "codeChallenge" | "codeChallengeMethod" | "requestedClaimsHash" | "platformBroker">>): Promise<AuthenticationResult>;
getTokenCache(): ITokenCache;
getLogger(): Logger;
setLogger(logger: Logger): void;
setActiveAccount(account: AccountInfo | null): void;
getActiveAccount(): AccountInfo | null;
initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
setNavigationClient(navigationClient: INavigationClient): void;
getConfiguration(): BrowserConfiguration;
isBrowserEnv(): boolean;
getBrowserCrypto(): ICrypto;
getPerformanceClient(): IPerformanceClient;
getRedirectResponse(): Map<string, Promise<AuthenticationResult | null>>;
clearCache(logoutRequest?: ClearCacheRequest): Promise<void>;
hydrateCache(result: AuthenticationResult, request: SilentRequest | SsoSilentRequest | RedirectRequest | PopupRequest): Promise<void>;
}
//# sourceMappingURL=UnknownOperatingContextController.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"UnknownOperatingContextController.d.ts","sourceRoot":"","sources":["../../../src/controllers/UnknownOperatingContextController.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,MAAM,EACN,OAAO,EACP,kBAAkB,EAElB,aAAa,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACH,mBAAmB,EAEtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,i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AK1C,mBAAmB,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAOlE,UAAU,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5D,YAAY,CAEd,MAAM,EAAE,oBAAoB,EAE5B,OAAO,EACD,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,YAAY,GACnB,OAAO,CAAC,IAAI,CAAC;CAInB"}
+80
View File
@@ -0,0 +1,80 @@
import { IPerformanceClient } from "@azure/msal-common/browser";
/**
* Check whether browser crypto is available.
*/
export declare function validateCryptoAvailable(skipValidateSubtleCrypto: boolean): void;
/**
* Returns a sha-256 hash of the given dataString as an ArrayBuffer.
* @param dataString {string} data string
* @param performanceClient {?IPerformanceClient}
* @param correlationId {?string} correlation id
*/
export declare function sha256Digest(dataString: string, performanceClient?: IPerformanceClient, correlationId?: string): Promise<ArrayBuffer>;
/**
* Populates buffer with cryptographically random values.
* @param dataBuffer
*/
export declare function getRandomValues(dataBuffer: Uint8Array): Uint8Array;
/**
* Creates a UUID v7 from the current timestamp.
* Implementation relies on the system clock to guarantee increasing order of generated identifiers.
* @returns {number}
*/
export declare function createNewGuid(): string;
/**
* Generates a keypair based on current keygen algorithm config.
* @param extractable
* @param usages
*/
export declare function generateKeyPair(extractable: boolean, usages: Array<KeyUsage>): Promise<CryptoKeyPair>;
/**
* Export key as Json Web Key (JWK)
* @param key
*/
export declare function exportJwk(key: CryptoKey): Promise<JsonWebKey>;
/**
* Imports key as Json Web Key (JWK), can set extractable and usages.
* @param key
* @param extractable
* @param usages
*/
export declare function importJwk(key: JsonWebKey, extractable: boolean, usages: Array<KeyUsage>): Promise<CryptoKey>;
/**
* Signs given data with given key
* @param key
* @param data
*/
export declare function sign(key: CryptoKey, data: ArrayBuffer): Promise<ArrayBuffer>;
/**
* Generates symmetric base encryption key. This may be stored as all encryption/decryption keys will be derived from this one.
*/
export declare function generateBaseKey(): Promise<ArrayBuffer>;
/**
* Returns the raw key to be passed into the key derivation function
* @param baseKey
* @returns
*/
export declare function generateHKDF(baseKey: ArrayBuffer): Promise<CryptoKey>;
/**
* Encrypt the given data given a base key. Returns encrypted data and a nonce that must be provided during decryption
* @param key
* @param rawData
*/
export declare function encrypt(baseKey: CryptoKey, rawData: string, context: string): Promise<{
data: string;
nonce: string;
}>;
/**
* Decrypt data with the given key and nonce
* @param key
* @param nonce
* @param encryptedData
* @returns
*/
export declare function decrypt(baseKey: CryptoKey, nonce: string, context: string, encryptedData: string): Promise<string>;
/**
* Returns the SHA-256 hash of an input string
* @param plainText
*/
export declare function hashString(plainText: string): Promise<string>;
//# sourceMappingURL=BrowserCrypto.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BrowserCrypto.d.ts","sourceRoot":"","sources":["../../../src/crypto/BrowserCrypto.ts"],"names":[],"mappings":"AASA,OAAO,EACH,kBAAkB,EAErB,MAAM,4BAA4B,CAAC;AA6CpC;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,wBAAwB,EAAE,OAAO,GAClC,IAAI,CAeN;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAC9B,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,WAAW,CAAC,CAWtB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAElE;AAWD;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAuCtC;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACjC,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,GACxB,OAAO,CAAC,aAAa,CAAC,CAMxB;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAKnE;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAC3B,GAAG,EAAE,UAAU,EACf,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,GACxB,OAAO,CAAC,SAAS,CAAC,CAQpB;AAED;;;;GAIG;AACH,wBAAsB,IAAI,CACtB,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,WAAW,GAClB,OAAO,CAAC,WAAW,CAAC,CAMtB;AAED;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,WAAW,CAAC,CAU5D;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAI3E;AA4BD;;;;GAIG;AACH,wBAAsB,OAAO,CACzB,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAkB1C;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CACzB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,CAajB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAInE"}
+75
View File
@@ -0,0 +1,75 @@
import { ICrypto, IPerformanceClient, Logger, ShrOptions, SignedHttpRequest, SignedHttpRequestParameters } from "@azure/msal-common/browser";
export type CachedKeyPair = {
publicKey: CryptoKey;
privateKey: CryptoKey;
requestMethod?: string;
requestUri?: string;
};
/**
* This class implements MSAL's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and
* implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).
*/
export declare class CryptoOps implements ICrypto {
private logger;
/**
* CryptoOps can be used in contexts outside a PCA instance,
* meaning there won't be a performance manager available.
*/
private performanceClient;
private static POP_KEY_USAGES;
private static EXTRACTABLE;
private cache;
constructor(logger: Logger, performanceClient?: IPerformanceClient, skipValidateSubtleCrypto?: boolean);
/**
* Creates a new random GUID - used to populate state and nonce.
* @returns string (GUID)
*/
createNewGuid(): string;
/**
* Encodes input string to base64.
* @param input
*/
base64Encode(input: string): string;
/**
* Decodes input string from base64.
* @param input
*/
base64Decode(input: string): string;
/**
* Encodes input string to base64 URL safe string.
* @param input
*/
base64UrlEncode(input: string): string;
/**
* Stringifies and base64Url encodes input public key
* @param inputKid
* @returns Base64Url encoded public key
*/
encodeKid(inputKid: string): string;
/**
* Generates a keypair, stores it and returns a thumbprint
* @param request
*/
getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string>;
/**
* Removes cryptographic keypair from key store matching the keyId passed in
* @param kid
*/
removeTokenBindingKey(kid: string): Promise<boolean>;
/**
* Removes all cryptographic keys from IndexedDB storage
*/
clearKeystore(): Promise<boolean>;
/**
* Signs the given object as a jwt payload with private key retrieved by given kid.
* @param payload
* @param kid
*/
signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise<string>;
/**
* Returns the SHA-256 hash of an input string
* @param plainText
*/
hashString(plainText: string): Promise<string>;
}
//# sourceMappingURL=CryptoOps.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"CryptoOps.d.ts","sourceRoot":"","sources":["../../../src/crypto/CryptoOps.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,kBAAkB,EAElB,MAAM,EAEN,UAAU,EACV,iBAAiB,EACjB,2BAA2B,EAC9B,MAAM,4BAA4B,CAAC;AAcpC,MAAM,MAAM,aAAa,GAAG;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,qBAAa,SAAU,YAAW,OAAO;IACrC,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;IACH,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,OAAO,CAAC,MAAM,CAAC,cAAc,CAAuC;IACpE,OAAO,CAAC,MAAM,CAAC,WAAW,CAAiB;IAC3C,OAAO,CAAC,KAAK,CAAoC;gBAG7C,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,kBAAkB,EACtC,wBAAwB,CAAC,EAAE,OAAO;IAWtC;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAItC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAInC;;;OAGG;IACG,sBAAsB,CACxB,OAAO,EAAE,2BAA2B,GACrC,OAAO,CAAC,MAAM,CAAC;IAqDlB;;;OAGG;IACG,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAM1D;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IA0BvC;;;;OAIG;IACG,OAAO,CACT,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,UAAU,EACvB,aAAa,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC;IA0DlB;;;OAGG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGvD"}
+9
View File
@@ -0,0 +1,9 @@
import { IPerformanceClient, Logger, PkceCodes } from "@azure/msal-common/browser";
/**
* This file defines APIs to generate PKCE codes and code verifiers.
*/
/**
* Generates PKCE Codes. See the RFC for more information: https://tools.ietf.org/html/rfc7636
*/
export declare function generatePkceCodes(performanceClient: IPerformanceClient, logger: Logger, correlationId: string): Promise<PkceCodes>;
//# sourceMappingURL=PkceGenerator.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../../../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,kBAAkB,EAClB,MAAM,EAEN,SAAS,EAGZ,MAAM,4BAA4B,CAAC;AAWpC;;GAEG;AAEH;;GAEG;AACH,wBAAsB,iBAAiB,CACnC,iBAAiB,EAAE,kBAAkB,EACrC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GACtB,OAAO,CAAC,SAAS,CAAC,CAuBpB"}
@@ -0,0 +1,31 @@
import { LoggerOptions, SignedHttpRequestParameters } from "@azure/msal-common/browser";
export type SignedHttpRequestOptions = {
loggerOptions: LoggerOptions;
};
export declare class SignedHttpRequest {
private popTokenGenerator;
private cryptoOps;
private shrParameters;
private logger;
constructor(shrParameters: SignedHttpRequestParameters, shrOptions?: SignedHttpRequestOptions);
/**
* Generates and caches a keypair for the given request options.
* @returns Public key digest, which should be sent to the token issuer.
*/
generatePublicKeyThumbprint(): Promise<string>;
/**
* Generates a signed http request for the given payload with the given key.
* @param payload Payload to sign (e.g. access token)
* @param publicKeyThumbprint Public key digest (from generatePublicKeyThumbprint API)
* @param claims Additional claims to include/override in the signed JWT
* @returns Pop token signed with the corresponding private key
*/
signRequest(payload: string, publicKeyThumbprint: string, claims?: object): Promise<string>;
/**
* Removes cached keys from browser for given public key thumbprint
* @param publicKeyThumbprint Public key digest (from generatePublicKeyThumbprint API)
* @returns If keys are properly deleted
*/
removeKeys(publicKeyThumbprint: string): Promise<boolean>;
}
//# sourceMappingURL=SignedHttpRequest.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SignedHttpRequest.d.ts","sourceRoot":"","sources":["../../../src/crypto/SignedHttpRequest.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,aAAa,EAEb,2BAA2B,EAC9B,MAAM,4BAA4B,CAAC;AAGpC,MAAM,MAAM,wBAAwB,GAAG;IACnC,aAAa,EAAE,aAAa,CAAC;CAChC,CAAC;AAEF,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,MAAM,CAAS;gBAGnB,aAAa,EAAE,2BAA2B,EAC1C,UAAU,CAAC,EAAE,wBAAwB;IASzC;;;OAGG;IACG,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC;IAQpD;;;;;;OAMG;IACG,WAAW,CACb,OAAO,EAAE,MAAM,EACf,mBAAmB,EAAE,MAAM,EAC3B,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC;IASlB;;;;OAIG;IACG,UAAU,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGlE"}
+15
View File
@@ -0,0 +1,15 @@
/**
* Class which exposes APIs to decode base64 strings to plaintext. See here for implementation details:
* https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem
*/
/**
* Returns a URL-safe plaintext decoded string from b64 encoded input.
* @param input
*/
export declare function base64Decode(input: string): string;
/**
* Decodes base64 into Uint8Array
* @param base64String
*/
export declare function base64DecToArr(base64String: string): Uint8Array;
//# sourceMappingURL=Base64Decode.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"Base64Decode.d.ts","sourceRoot":"","sources":["../../../src/encode/Base64Decode.ts"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,UAAU,CAkB/D"}
+20
View File
@@ -0,0 +1,20 @@
/**
* Class which exposes APIs to encode plaintext to base64 encoded string. See here for implementation details:
* https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_2_%E2%80%93_JavaScript's_UTF-16_%3E_UTF-8_%3E_base64
*/
/**
* Returns URL Safe b64 encoded string from a plaintext string.
* @param input
*/
export declare function urlEncode(input: string): string;
/**
* Returns URL Safe b64 encoded string from an int8Array.
* @param inputArr
*/
export declare function urlEncodeArr(inputArr: Uint8Array): string;
/**
* Returns b64 encoded string from plaintext string.
* @param input
*/
export declare function base64Encode(input: string): string;
//# sourceMappingURL=Base64Encode.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"Base64Encode.d.ts","sourceRoot":"","sources":["../../../src/encode/Base64Encode.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAKzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD"}
+258
View File
@@ -0,0 +1,258 @@
import { AuthError } from "@azure/msal-common/browser";
import * as BrowserAuthErrorCodes from "./BrowserAuthErrorCodes.js";
export { BrowserAuthErrorCodes };
/**
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
*/
export declare const BrowserAuthErrorMessages: {
pkce_not_created: string;
crypto_nonexistent: string;
empty_navigate_uri: string;
hash_empty_error: string;
no_state_in_hash: string;
hash_does_not_contain_known_properties: string;
unable_to_parse_state: string;
state_interaction_type_mismatch: string;
interaction_in_progress: string;
popup_window_error: string;
empty_window_error: string;
user_cancelled: string;
monitor_popup_timeout: string;
monitor_window_timeout: string;
redirect_in_iframe: string;
block_iframe_reload: string;
block_nested_popups: string;
iframe_closed_prematurely: string;
silent_logout_unsupported: string;
no_account_error: string;
silent_prompt_value_error: string;
no_token_request_cache_error: string;
unable_to_parse_token_request_cache_error: string;
no_cached_authority_error: string;
auth_request_not_set_error: string;
invalid_cache_type: string;
non_browser_environment: string;
database_not_open: string;
no_network_connectivity: string;
post_request_failed: string;
get_request_failed: string;
failed_to_parse_response: string;
unable_to_load_token: string;
crypto_key_not_found: string;
auth_code_required: string;
auth_code_or_nativeAccountId_required: string;
spa_code_and_nativeAccountId_present: string;
database_unavailable: string;
unable_to_acquire_token_from_native_platform: string;
native_handshake_timeout: string;
native_extension_not_installed: string;
native_connection_not_established: string;
uninitialized_public_client_application: string;
native_prompt_not_supported: string;
invalid_base64_string: string;
invalid_pop_token_request: string;
failed_to_build_headers: string;
failed_to_parse_headers: string;
};
/**
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
* @deprecated Use exported BrowserAuthErrorCodes instead.
* In your app you can do :
* ```
* import { BrowserAuthErrorCodes } from "@azure/msal-browser";
* ```
*/
export declare const BrowserAuthErrorMessage: {
pkceNotGenerated: {
code: string;
desc: string;
};
cryptoDoesNotExist: {
code: string;
desc: string;
};
emptyNavigateUriError: {
code: string;
desc: string;
};
hashEmptyError: {
code: string;
desc: string;
};
hashDoesNotContainStateError: {
code: string;
desc: string;
};
hashDoesNotContainKnownPropertiesError: {
code: string;
desc: string;
};
unableToParseStateError: {
code: string;
desc: string;
};
stateInteractionTypeMismatchError: {
code: string;
desc: string;
};
interactionInProgress: {
code: string;
desc: string;
};
popupWindowError: {
code: string;
desc: string;
};
emptyWindowError: {
code: string;
desc: string;
};
userCancelledError: {
code: string;
desc: string;
};
monitorPopupTimeoutError: {
code: string;
desc: string;
};
monitorIframeTimeoutError: {
code: string;
desc: string;
};
redirectInIframeError: {
code: string;
desc: string;
};
blockTokenRequestsInHiddenIframeError: {
code: string;
desc: string;
};
blockAcquireTokenInPopupsError: {
code: string;
desc: string;
};
iframeClosedPrematurelyError: {
code: string;
desc: string;
};
silentLogoutUnsupportedError: {
code: string;
desc: string;
};
noAccountError: {
code: string;
desc: string;
};
silentPromptValueError: {
code: string;
desc: string;
};
noTokenRequestCacheError: {
code: string;
desc: string;
};
unableToParseTokenRequestCacheError: {
code: string;
desc: string;
};
noCachedAuthorityError: {
code: string;
desc: string;
};
authRequestNotSet: {
code: string;
desc: string;
};
invalidCacheType: {
code: string;
desc: string;
};
notInBrowserEnvironment: {
code: string;
desc: string;
};
databaseNotOpen: {
code: string;
desc: string;
};
noNetworkConnectivity: {
code: string;
desc: string;
};
postRequestFailed: {
code: string;
desc: string;
};
getRequestFailed: {
code: string;
desc: string;
};
failedToParseNetworkResponse: {
code: string;
desc: string;
};
unableToLoadTokenError: {
code: string;
desc: string;
};
signingKeyNotFoundInStorage: {
code: string;
desc: string;
};
authCodeRequired: {
code: string;
desc: string;
};
authCodeOrNativeAccountRequired: {
code: string;
desc: string;
};
spaCodeAndNativeAccountPresent: {
code: string;
desc: string;
};
databaseUnavailable: {
code: string;
desc: string;
};
unableToAcquireTokenFromNativePlatform: {
code: string;
desc: string;
};
nativeHandshakeTimeout: {
code: string;
desc: string;
};
nativeExtensionNotInstalled: {
code: string;
desc: string;
};
nativeConnectionNotEstablished: {
code: string;
desc: string;
};
uninitializedPublicClientApplication: {
code: string;
desc: string;
};
nativePromptNotSupported: {
code: string;
desc: string;
};
invalidBase64StringError: {
code: string;
desc: string;
};
invalidPopTokenRequest: {
code: string;
desc: string;
};
};
/**
* Browser library error class thrown by the MSAL.js library for SPAs
*/
export declare class BrowserAuthError extends AuthError {
constructor(errorCode: string, subError?: string);
}
export declare function createBrowserAuthError(errorCode: string, subError?: string): BrowserAuthError;
//# sourceMappingURL=BrowserAuthError.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BrowserAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/BrowserAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAIjC;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFpC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+OnC,CAAC;AAEF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;gBAC/B,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;CAMnD;AAED,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAElB"}
@@ -0,0 +1,49 @@
export declare const pkceNotCreated = "pkce_not_created";
export declare const cryptoNonExistent = "crypto_nonexistent";
export declare const emptyNavigateUri = "empty_navigate_uri";
export declare const hashEmptyError = "hash_empty_error";
export declare const noStateInHash = "no_state_in_hash";
export declare const hashDoesNotContainKnownProperties = "hash_does_not_contain_known_properties";
export declare const unableToParseState = "unable_to_parse_state";
export declare const stateInteractionTypeMismatch = "state_interaction_type_mismatch";
export declare const interactionInProgress = "interaction_in_progress";
export declare const popupWindowError = "popup_window_error";
export declare const emptyWindowError = "empty_window_error";
export declare const userCancelled = "user_cancelled";
export declare const monitorPopupTimeout = "monitor_popup_timeout";
export declare const monitorWindowTimeout = "monitor_window_timeout";
export declare const redirectInIframe = "redirect_in_iframe";
export declare const blockIframeReload = "block_iframe_reload";
export declare const blockNestedPopups = "block_nested_popups";
export declare const iframeClosedPrematurely = "iframe_closed_prematurely";
export declare const silentLogoutUnsupported = "silent_logout_unsupported";
export declare const noAccountError = "no_account_error";
export declare const silentPromptValueError = "silent_prompt_value_error";
export declare const noTokenRequestCacheError = "no_token_request_cache_error";
export declare const unableToParseTokenRequestCacheError = "unable_to_parse_token_request_cache_error";
export declare const noCachedAuthorityError = "no_cached_authority_error";
export declare const authRequestNotSetError = "auth_request_not_set_error";
export declare const invalidCacheType = "invalid_cache_type";
export declare const nonBrowserEnvironment = "non_browser_environment";
export declare const databaseNotOpen = "database_not_open";
export declare const noNetworkConnectivity = "no_network_connectivity";
export declare const postRequestFailed = "post_request_failed";
export declare const getRequestFailed = "get_request_failed";
export declare const failedToParseResponse = "failed_to_parse_response";
export declare const unableToLoadToken = "unable_to_load_token";
export declare const cryptoKeyNotFound = "crypto_key_not_found";
export declare const authCodeRequired = "auth_code_required";
export declare const authCodeOrNativeAccountIdRequired = "auth_code_or_nativeAccountId_required";
export declare const spaCodeAndNativeAccountIdPresent = "spa_code_and_nativeAccountId_present";
export declare const databaseUnavailable = "database_unavailable";
export declare const unableToAcquireTokenFromNativePlatform = "unable_to_acquire_token_from_native_platform";
export declare const nativeHandshakeTimeout = "native_handshake_timeout";
export declare const nativeExtensionNotInstalled = "native_extension_not_installed";
export declare const nativeConnectionNotEstablished = "native_connection_not_established";
export declare const uninitializedPublicClientApplication = "uninitialized_public_client_application";
export declare const nativePromptNotSupported = "native_prompt_not_supported";
export declare const invalidBase64String = "invalid_base64_string";
export declare const invalidPopTokenRequest = "invalid_pop_token_request";
export declare const failedToBuildHeaders = "failed_to_build_headers";
export declare const failedToParseHeaders = "failed_to_parse_headers";
//# sourceMappingURL=BrowserAuthErrorCodes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BrowserAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/BrowserAuthErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AACtD,eAAO,MAAM,gBAAgB,uBAAuB,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,eAAO,MAAM,iBAAiB,yBAAyB,CAAC;AACxD,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,iCAAiC,0CACH,CAAC;AAC5C,eAAO,MAAM,gCAAgC,yCACH,CAAC;AAC3C,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,sCAAsC,iDACD,CAAC;AACnD,eAAO,MAAM,sBAAsB,6BAA6B,CAAC;AACjE,eAAO,MAAM,2BAA2B,mCAAmC,CAAC;AAC5E,eAAO,MAAM,8BAA8B,sCACJ,CAAC;AACxC,eAAO,MAAM,oCAAoC,4CACJ,CAAC;AAC9C,eAAO,MAAM,wBAAwB,gCAAgC,CAAC;AACtE,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAClE,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,4BAA4B,CAAC"}
@@ -0,0 +1,34 @@
import { AuthError } from "@azure/msal-common/browser";
import * as BrowserConfigurationAuthErrorCodes from "./BrowserConfigurationAuthErrorCodes.js";
export { BrowserConfigurationAuthErrorCodes };
export declare const BrowserConfigurationAuthErrorMessages: {
storage_not_supported: string;
stubbed_public_client_application_called: string;
in_mem_redirect_unavailable: string;
};
/**
* BrowserAuthErrorMessage class containing string constants used by error codes and messages.
* @deprecated Use BrowserAuthErrorCodes instead
*/
export declare const BrowserConfigurationAuthErrorMessage: {
storageNotSupportedError: {
code: string;
desc: string;
};
stubPcaInstanceCalled: {
code: string;
desc: string;
};
inMemRedirectUnavailable: {
code: string;
desc: string;
};
};
/**
* Browser library error class thrown by the MSAL.js library for SPAs
*/
export declare class BrowserConfigurationAuthError extends AuthError {
constructor(errorCode: string, errorMessage?: string);
}
export declare function createBrowserConfigurationAuthError(errorCode: string): BrowserConfigurationAuthError;
//# sourceMappingURL=BrowserConfigurationAuthError.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BrowserConfigurationAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/BrowserConfigurationAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,kCAAkC,MAAM,yCAAyC,CAAC;AAC9F,OAAO,EAAE,kCAAkC,EAAE,CAAC;AAE9C,eAAO,MAAM,qCAAqC;;;;CAOjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;CAoBhD,CAAC;AAEF;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,SAAS;gBAC5C,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;CAMvD;AAED,wBAAgB,mCAAmC,CAC/C,SAAS,EAAE,MAAM,GAClB,6BAA6B,CAK/B"}
@@ -0,0 +1,4 @@
export declare const storageNotSupported = "storage_not_supported";
export declare const stubbedPublicClientApplicationCalled = "stubbed_public_client_application_called";
export declare const inMemRedirectUnavailable = "in_mem_redirect_unavailable";
//# sourceMappingURL=BrowserConfigurationAuthErrorCodes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BrowserConfigurationAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/BrowserConfigurationAuthErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,oCAAoC,6CACH,CAAC;AAC/C,eAAO,MAAM,wBAAwB,gCAAgC,CAAC"}
+30
View File
@@ -0,0 +1,30 @@
import { AuthError } from "@azure/msal-common/browser";
import * as NativeAuthErrorCodes from "./NativeAuthErrorCodes.js";
export { NativeAuthErrorCodes };
export type OSError = {
error?: number;
protocol_error?: string;
properties?: object;
status?: string;
retryable?: boolean;
};
export declare const NativeAuthErrorMessages: {
user_switch: string;
};
export declare class NativeAuthError extends AuthError {
ext: OSError | undefined;
constructor(errorCode: string, description?: string, ext?: OSError);
}
/**
* These errors should result in a fallback to the 'standard' browser based auth flow.
*/
export declare function isFatalNativeAuthError(error: NativeAuthError): boolean;
/**
* Create the appropriate error object based on the WAM status code.
* @param code
* @param description
* @param ext
* @returns
*/
export declare function createNativeAuthError(code: string, description?: string, ext?: OSError): AuthError;
//# sourceMappingURL=NativeAuthError.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/NativeAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,SAAS,EAIZ,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,MAAM,MAAM,OAAO,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAIF,eAAO,MAAM,uBAAuB;;CAGnC,CAAC;AAEF,qBAAa,eAAgB,SAAQ,SAAS;IAC1C,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC;gBAEb,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO;CAOrE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAwBtE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,OAAO,GACd,SAAS,CAyBX"}
@@ -0,0 +1,3 @@
export declare const contentError = "ContentError";
export declare const userSwitch = "user_switch";
//# sourceMappingURL=NativeAuthErrorCodes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeAuthErrorCodes.d.ts","sourceRoot":"","sources":["../../../src/error/NativeAuthErrorCodes.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,UAAU,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
import { AuthError } from "@azure/msal-common/browser";
/**
* NestedAppAuthErrorMessage class containing string constants used by error codes and messages.
*/
export declare const NestedAppAuthErrorMessage: {
unsupportedMethod: {
code: string;
desc: string;
};
};
export declare class NestedAppAuthError extends AuthError {
constructor(errorCode: string, errorMessage?: string);
static createUnsupportedError(): NestedAppAuthError;
}
//# sourceMappingURL=NestedAppAuthError.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NestedAppAuthError.d.ts","sourceRoot":"","sources":["../../../src/error/NestedAppAuthError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;CAKrC,CAAC;AAEF,qBAAa,kBAAmB,SAAQ,SAAS;gBACjC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;WAOtC,sBAAsB,IAAI,kBAAkB;CAM7D"}
+49
View File
@@ -0,0 +1,49 @@
import { Logger } from "@azure/msal-common/browser";
import { InteractionType } from "../utils/BrowserConstants.js";
import { EventCallbackFunction, EventError, EventPayload } from "./EventMessage.js";
import { EventType } from "./EventType.js";
export declare class EventHandler {
private eventCallbacks;
private logger;
private broadcastChannel;
constructor(logger?: Logger);
/**
* Adds event callbacks to array
* @param callback - callback to be invoked when an event is raised
* @param eventTypes - list of events that this callback will be invoked for, if not provided callback will be invoked for all events
* @param callbackId - Identifier for the callback, used to locate and remove the callback when no longer required
*/
addEventCallback(callback: EventCallbackFunction, eventTypes?: Array<EventType>, callbackId?: string): string | null;
/**
* Removes callback with provided id from callback array
* @param callbackId
*/
removeEventCallback(callbackId: string): void;
/**
* Emits events by calling callback with event message
* @param eventType
* @param interactionType
* @param payload
* @param error
*/
emitEvent(eventType: EventType, interactionType?: InteractionType, payload?: EventPayload, error?: EventError): void;
/**
* Invoke registered callbacks
* @param message
*/
private invokeCallbacks;
/**
* Wrapper around invokeCallbacks to handle broadcast events received from other tabs/instances
* @param event
*/
private invokeCrossTabCallbacks;
/**
* Listen for events broadcasted from other tabs/instances
*/
subscribeCrossTab(): void;
/**
* Unsubscribe from broadcast events
*/
unsubscribeCrossTab(): void;
}
//# sourceMappingURL=EventHandler.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"EventHandler.d.ts","sourceRoot":"","sources":["../../../src/event/EventHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACH,qBAAqB,EACrB,UAAU,EAEV,YAAY,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK3C,qBAAa,YAAY;IAErB,OAAO,CAAC,cAAc,CAGpB;IACF,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,MAAM,CAAC,EAAE,MAAM;IAO3B;;;;;OAKG;IACH,gBAAgB,CACZ,QAAQ,EAAE,qBAAqB,EAC/B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,EAC7B,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,IAAI;IAkBhB;;;OAGG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK7C;;;;;;OAMG;IACH,SAAS,CACL,SAAS,EAAE,SAAS,EACpB,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,YAAY,EACtB,KAAK,CAAC,EAAE,UAAU,GACnB,IAAI;IAuBP;;;OAGG;IACH,OAAO,CAAC,eAAe;IAsBvB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAK/B;;OAEG;IACH,iBAAiB,IAAI,IAAI;IAOzB;;OAEG;IACH,mBAAmB,IAAI,IAAI;CAM9B"}
+31
View File
@@ -0,0 +1,31 @@
import { AuthError, AccountInfo } from "@azure/msal-common/browser";
import { EventType } from "./EventType.js";
import { InteractionStatus, InteractionType } from "../utils/BrowserConstants.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
export type EventMessage = {
eventType: EventType;
interactionType: InteractionType | null;
payload: EventPayload;
error: EventError;
timestamp: number;
};
export type PopupEvent = {
popupWindow: Window;
};
export type EventPayload = AccountInfo | PopupRequest | RedirectRequest | SilentRequest | SsoSilentRequest | EndSessionRequest | AuthenticationResult | PopupEvent | null;
export type EventError = AuthError | Error | null;
export type EventCallbackFunction = (message: EventMessage) => void;
export declare class EventMessageUtils {
/**
* Gets interaction status from event message
* @param message
* @param currentStatus
*/
static getInteractionStatusFromEvent(message: EventMessage, currentStatus?: InteractionStatus): InteractionStatus | null;
}
//# sourceMappingURL=EventMessage.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"EventMessage.d.ts","sourceRoot":"","sources":["../../../src/event/EventMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACH,iBAAiB,EACjB,eAAe,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,MAAM,MAAM,YAAY,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACrB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAClB,WAAW,GACX,YAAY,GACZ,eAAe,GACf,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,UAAU,GACV,IAAI,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;AAEpE,qBAAa,iBAAiB;IAC1B;;;;OAIG;IACH,MAAM,CAAC,6BAA6B,CAChC,OAAO,EAAE,YAAY,EACrB,aAAa,CAAC,EAAE,iBAAiB,GAClC,iBAAiB,GAAG,IAAI;CAuE9B"}
+30
View File
@@ -0,0 +1,30 @@
export declare const EventType: {
readonly INITIALIZE_START: "msal:initializeStart";
readonly INITIALIZE_END: "msal:initializeEnd";
readonly ACCOUNT_ADDED: "msal:accountAdded";
readonly ACCOUNT_REMOVED: "msal:accountRemoved";
readonly ACTIVE_ACCOUNT_CHANGED: "msal:activeAccountChanged";
readonly LOGIN_START: "msal:loginStart";
readonly LOGIN_SUCCESS: "msal:loginSuccess";
readonly LOGIN_FAILURE: "msal:loginFailure";
readonly ACQUIRE_TOKEN_START: "msal:acquireTokenStart";
readonly ACQUIRE_TOKEN_SUCCESS: "msal:acquireTokenSuccess";
readonly ACQUIRE_TOKEN_FAILURE: "msal:acquireTokenFailure";
readonly ACQUIRE_TOKEN_NETWORK_START: "msal:acquireTokenFromNetworkStart";
readonly SSO_SILENT_START: "msal:ssoSilentStart";
readonly SSO_SILENT_SUCCESS: "msal:ssoSilentSuccess";
readonly SSO_SILENT_FAILURE: "msal:ssoSilentFailure";
readonly ACQUIRE_TOKEN_BY_CODE_START: "msal:acquireTokenByCodeStart";
readonly ACQUIRE_TOKEN_BY_CODE_SUCCESS: "msal:acquireTokenByCodeSuccess";
readonly ACQUIRE_TOKEN_BY_CODE_FAILURE: "msal:acquireTokenByCodeFailure";
readonly HANDLE_REDIRECT_START: "msal:handleRedirectStart";
readonly HANDLE_REDIRECT_END: "msal:handleRedirectEnd";
readonly POPUP_OPENED: "msal:popupOpened";
readonly LOGOUT_START: "msal:logoutStart";
readonly LOGOUT_SUCCESS: "msal:logoutSuccess";
readonly LOGOUT_FAILURE: "msal:logoutFailure";
readonly LOGOUT_END: "msal:logoutEnd";
readonly RESTORE_FROM_BFCACHE: "msal:restoreFromBFCache";
};
export type EventType = (typeof EventType)[keyof typeof EventType];
//# sourceMappingURL=EventType.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"EventType.d.ts","sourceRoot":"","sources":["../../../src/event/EventType.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC"}
+44
View File
@@ -0,0 +1,44 @@
/**
* @packageDocumentation
* @module @azure/msal-browser
*/
import * as BrowserUtils from "./utils/BrowserUtils.js";
export { BrowserUtils };
export { PublicClientApplication, createNestablePublicClientApplication, createStandardPublicClientApplication, } from "./app/PublicClientApplication.js";
export { PublicClientNext } from "./app/PublicClientNext.js";
export { IController } from "./controllers/IController.js";
export { Configuration, BrowserAuthOptions, CacheOptions, BrowserSystemOptions, BrowserTelemetryOptions, BrowserConfiguration, DEFAULT_IFRAME_TIMEOUT_MS, } from "./config/Configuration.js";
export { InteractionType, InteractionStatus, BrowserCacheLocation, WrapperSKU, ApiId, CacheLookupPolicy, } from "./utils/BrowserConstants.js";
export { BrowserAuthError, BrowserAuthErrorMessage, BrowserAuthErrorCodes, } from "./error/BrowserAuthError.js";
export { BrowserConfigurationAuthError, BrowserConfigurationAuthErrorCodes, BrowserConfigurationAuthErrorMessage, } from "./error/BrowserConfigurationAuthError.js";
export { IPublicClientApplication, stubbedPublicClientApplication, } from "./app/IPublicClientApplication.js";
export { INavigationClient } from "./navigation/INavigationClient.js";
export { NavigationClient } from "./navigation/NavigationClient.js";
export { NavigationOptions } from "./navigation/NavigationOptions.js";
export { PopupRequest } from "./request/PopupRequest.js";
export { RedirectRequest } from "./request/RedirectRequest.js";
export { SilentRequest } from "./request/SilentRequest.js";
export { SsoSilentRequest } from "./request/SsoSilentRequest.js";
export { EndSessionRequest } from "./request/EndSessionRequest.js";
export { EndSessionPopupRequest } from "./request/EndSessionPopupRequest.js";
export { AuthorizationUrlRequest } from "./request/AuthorizationUrlRequest.js";
export { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest.js";
export { AuthenticationResult } from "./response/AuthenticationResult.js";
export { ClearCacheRequest } from "./request/ClearCacheRequest.js";
export { InitializeApplicationRequest } from "./request/InitializeApplicationRequest.js";
export { LoadTokenOptions } from "./cache/TokenCache.js";
export { ITokenCache } from "./cache/ITokenCache.js";
export { MemoryStorage } from "./cache/MemoryStorage.js";
export { LocalStorage } from "./cache/LocalStorage.js";
export { SessionStorage } from "./cache/SessionStorage.js";
export { IWindowStorage } from "./cache/IWindowStorage.js";
export { EventMessage, EventPayload, EventError, EventCallbackFunction, EventMessageUtils, PopupEvent, } from "./event/EventMessage.js";
export { EventType } from "./event/EventType.js";
export { EventHandler } from "./event/EventHandler.js";
export { SignedHttpRequest, SignedHttpRequestOptions, } from "./crypto/SignedHttpRequest.js";
export { PopupWindowAttributes, PopupSize, PopupPosition, } from "./request/PopupWindowAttributes.js";
export { BrowserPerformanceClient } from "./telemetry/BrowserPerformanceClient.js";
export { BrowserPerformanceMeasurement } from "./telemetry/BrowserPerformanceMeasurement.js";
export { AuthenticationScheme, AccountInfo, AccountEntity, IdTokenClaims, AuthError, AuthErrorCodes, AuthErrorMessage, ClientAuthError, ClientAuthErrorCodes, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorCodes, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorCodes, InteractionRequiredAuthErrorMessage, ServerError, INetworkModule, NetworkResponse, NetworkRequestOptions, ILoggerCallback, Logger, LogLevel, ProtocolMode, ServerResponseType, PromptValue, ExternalTokenResponse, StringUtils, UrlString, JsonWebTokenTypes, AzureCloudInstance, AzureCloudOptions, AuthenticationHeaderParser, OIDC_DEFAULT_SCOPES, PerformanceCallbackFunction, PerformanceEvent, PerformanceEvents, InProgressPerformanceEvent, TenantProfile, IPerformanceClient, StubPerformanceClient, } from "@azure/msal-common/browser";
export { version } from "./packageMetadata.js";
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH,OAAO,KAAK,YAAY,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,OAAO,EACH,uBAAuB,EACvB,qCAAqC,EACrC,qCAAqC,GACxC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,GAC5B,MAAM,2BAA2B,CAAC;AACn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AO,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,59 @@
import { ICrypto, INetworkModule, Logger, AccountInfo, ServerTelemetryManager, Authority, IPerformanceClient, AzureCloudOptions, StringDict } from "@azure/msal-common/browser";
import { BrowserConfiguration } from "../config/Configuration.js";
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
import { EventHandler } from "../event/EventHandler.js";
import { EndSessionRequest } from "../request/EndSessionRequest.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
import { ClearCacheRequest } from "../request/ClearCacheRequest.js";
export declare abstract class BaseInteractionClient {
protected config: BrowserConfiguration;
protected browserStorage: BrowserCacheManager;
protected browserCrypto: ICrypto;
protected networkClient: INetworkModule;
protected logger: Logger;
protected eventHandler: EventHandler;
protected navigationClient: INavigationClient;
protected nativeMessageHandler: NativeMessageHandler | undefined;
protected correlationId: string;
protected performanceClient: IPerformanceClient;
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeMessageHandler?: NativeMessageHandler, correlationId?: string);
abstract acquireToken(request: RedirectRequest | PopupRequest | SsoSilentRequest): Promise<AuthenticationResult | void>;
abstract logout(request: EndSessionRequest | ClearCacheRequest | undefined): Promise<void>;
protected clearCacheOnLogout(account?: AccountInfo | null): Promise<void>;
/**
*
* Use to get the redirect uri configured in MSAL or null.
* @param requestRedirectUri
* @returns Redirect URL
*
*/
getRedirectUri(requestRedirectUri?: string): string;
/**
*
* @param apiId
* @param correlationId
* @param forceRefresh
*/
protected initializeServerTelemetryManager(apiId: number, forceRefresh?: boolean): ServerTelemetryManager;
/**
* Used to get a discovered version of the default authority.
* @param params {
* requestAuthority?: string;
* requestAzureCloudOptions?: AzureCloudOptions;
* requestExtraQueryParameters?: StringDict;
* account?: AccountInfo;
* }
*/
protected getDiscoveredAuthority(params: {
requestAuthority?: string;
requestAzureCloudOptions?: AzureCloudOptions;
requestExtraQueryParameters?: StringDict;
account?: AccountInfo;
}): Promise<Authority>;
}
//# sourceMappingURL=BaseInteractionClient.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"BaseInteractionClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/BaseInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,OAAO,EACP,cAAc,EACd,MAAM,EACN,WAAW,EAGX,sBAAsB,EAItB,SAAS,EAGT,kBAAkB,EAElB,iBAAiB,EAEjB,UAAU,EACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAIlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,8BAAsB,qBAAqB;IACvC,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACvC,SAAS,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC9C,SAAS,CAAC,aAAa,E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AC;QAC7C,2BAA2B,CAAC,EAAE,UAAU,CAAC;QACzC,OAAO,CAAC,EAAE,WAAW,CAAC;KACzB,GAAG,OAAO,CAAC,SAAS,CAAC;CAmEzB"}
@@ -0,0 +1,5 @@
import { AuthorizationCodeClient, ClientConfiguration } from "@azure/msal-common/browser";
export declare class HybridSpaAuthorizationCodeClient extends AuthorizationCodeClient {
constructor(config: ClientConfiguration);
}
//# sourceMappingURL=HybridSpaAuthorizationCodeClient.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"HybridSpaAuthorizationCodeClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/HybridSpaAuthorizationCodeClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,uBAAuB,EACvB,mBAAmB,EACtB,MAAM,4BAA4B,CAAC;AAEpC,qBAAa,gCAAiC,SAAQ,uBAAuB;gBAC7D,MAAM,EAAE,mBAAmB;CAI1C"}
@@ -0,0 +1,151 @@
import { Logger, ICrypto, AccountEntity, ScopeSet, IPerformanceClient, TokenClaims, InProgressPerformanceEvent } from "@azure/msal-common/browser";
import { BaseInteractionClient } from "./BaseInteractionClient.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
import { EventHandler } from "../event/EventHandler.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { SilentRequest } from "../request/SilentRequest.js";
import { SsoSilentRequest } from "../request/SsoSilentRequest.js";
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
import { ApiId, CacheLookupPolicy } from "../utils/BrowserConstants.js";
import { NativeTokenRequest } from "../broker/nativeBroker/NativeRequest.js";
import { MATS, NativeResponse } from "../broker/nativeBroker/NativeResponse.js";
import { RedirectRequest } from "../request/RedirectRequest.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { SilentCacheClient } from "./SilentCacheClient.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
export declare class NativeInteractionClient extends BaseInteractionClient {
protected apiId: ApiId;
protected accountId: string;
protected nativeMessageHandler: NativeMessageHandler;
protected silentCacheClient: SilentCacheClient;
protected nativeStorageManager: BrowserCacheManager;
protected skus: string;
constructor(config: BrowserConfiguration, browserStorage: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient, provider: NativeMessageHandler, accountId: string, nativeStorageImpl: BrowserCacheManager, correlationId?: string);
/**
* Adds SKUs to request extra query parameters
* @param request {NativeTokenRequest}
* @private
*/
private addRequestSKUs;
/**
* Acquire token from native platform via browser extension
* @param request
*/
acquireToken(request: PopupRequest | SilentRequest | SsoSilentRequest, cacheLookupPolicy?: CacheLookupPolicy): Promise<AuthenticationResult>;
/**
* Creates silent flow request
* @param request
* @param cachedAccount
* @returns CommonSilentFlowRequest
*/
private createSilentCacheRequest;
/**
* Fetches the tokens from the cache if un-expired
* @param nativeAccountId
* @param request
* @returns authenticationResult
*/
protected acquireTokensFromCache(nativeAccountId: string, request: NativeTokenRequest): Promise<AuthenticationResult>;
/**
* Acquires a token from native platform then redirects to the redirectUri instead of returning the response
* @param {RedirectRequest} request
* @param {InProgressPerformanceEvent} rootMeasurement
*/
acquireTokenRedirect(request: RedirectRequest, rootMeasurement: InProgressPerformanceEvent): Promise<void>;
/**
* If the previous page called native platform for a token using redirect APIs, send the same request again and return the response
* @param performanceClient {IPerformanceClient?}
* @param correlationId {string?} correlation identifier
*/
handleRedirectPromise(performanceClient?: IPerformanceClient, correlationId?: string): Promise<AuthenticationResult | null>;
/**
* Logout from native platform via browser extension
* @param request
*/
logout(): Promise<void>;
/**
* Transform response from native platform into AuthenticationResult object which will be returned to the end user
* @param response
* @param request
* @param reqTimestamp
*/
protected handleNativeResponse(response: NativeResponse, request: NativeTokenRequest, reqTimestamp: number): Promise<AuthenticationResult>;
/**
* creates an homeAccountIdentifier for the account
* @param response
* @param idTokenObj
* @returns
*/
protected createHomeAccountIdentifier(response: NativeResponse, idTokenClaims: TokenClaims): string;
/**
* Helper to generate scopes
* @param response
* @param request
* @returns
*/
generateScopes(response: NativeResponse, request: NativeTokenRequest): ScopeSet;
/**
* If PoP token is requesred, records the PoP token if returned from the WAM, else generates one in the browser
* @param request
* @param response
*/
generatePopAccessToken(response: NativeResponse, request: NativeTokenRequest): Promise<string>;
/**
* Generates authentication result
* @param response
* @param request
* @param idTokenObj
* @param accountEntity
* @param authority
* @param reqTimestamp
* @returns
*/
protected generateAuthenticationResult(response: NativeResponse, request: NativeTokenRequest, idTokenClaims: TokenClaims, accountEntity: AccountEntity, authority: string, reqTimestamp: number): Promise<AuthenticationResult>;
/**
* cache the account entity in browser storage
* @param accountEntity
*/
cacheAccount(accountEntity: AccountEntity): Promise<void>;
/**
* Stores the access_token and id_token in inmemory storage
* @param response
* @param request
* @param homeAccountIdentifier
* @param idTokenObj
* @param responseAccessToken
* @param tenantId
* @param reqTimestamp
*/
cacheNativeTokens(response: NativeResponse, request: NativeTokenRequest, homeAccountIdentifier: string, idTokenClaims: TokenClaims, responseAccessToken: string, tenantId: string, reqTimestamp: number): Promise<void>;
protected addTelemetryFromNativeResponse(response: NativeResponse): MATS | null;
/**
* Validates native platform response before processing
* @param response
*/
private validateNativeResponse;
/**
* Gets MATS telemetry from native response
* @param response
* @returns
*/
private getMATSFromResponse;
/**
* Returns whether or not response came from native cache
* @param response
* @returns
*/
protected isResponseFromCache(mats: MATS): boolean;
/**
* Translates developer provided request object into NativeRequest object
* @param request
*/
protected initializeNativeRequest(request: PopupRequest | SsoSilentRequest): Promise<NativeTokenRequest>;
/**
* Handles extra broker request parameters
* @param request {NativeTokenRequest}
* @private
*/
private handleExtraBrokerParams;
}
//# sourceMappingURL=NativeInteractionClient.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NativeInteractionClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/NativeInteractionClient.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,MAAM,EACN,OAAO,EAIP,aAAa,EAEb,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AE,cAAc,EACxB,OAAO,EAAE,kBAAkB,GAC5B,QAAQ;IAMX;;;;OAIG;IACG,sBAAsB,CACxB,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,MAAM,CAAC;IA8ClB;;;;;;;;;OASG;cACa,4BAA4B,CACxC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,kBAAkB,EAC3B,aAAa,EAAE,WAAW,EAC1B,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACrB,OAAO,CAAC,oBAAoB,CAAC;IAmEhC;;;OAGG;IACG,YAAY,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAY/D;;;;;;;;;OASG;IACH,iBAAiB,CACb,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,kBAAkB,EAC3B,qBAAqB,EAAE,MAAM,EAC7B,aAAa,EAAE,WAAW,EAC1B,mBAAmB,EAAE,MAAM,EAC3B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC;IAiDhB,SAAS,CAAC,8BAA8B,CACpC,QAAQ,EAAE,cAAc,GACzB,IAAI,GAAG,IAAI;IAgCd;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAkB9B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAc3B;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;IAWlD;;;OAGG;cACa,uBAAuB,CACnC,OAAO,EAAE,YAAY,GAAG,gBAAgB,GACzC,OAAO,CAAC,kBAAkB,CAAC;IAwI9B;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;CA2ClC"}
@@ -0,0 +1,107 @@
import { CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto, PkceCodes } from "@azure/msal-common/browser";
import { StandardInteractionClient } from "./StandardInteractionClient.js";
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest.js";
import { PopupRequest } from "../request/PopupRequest.js";
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler.js";
import { INavigationClient } from "../navigation/INavigationClient.js";
import { EventHandler } from "../event/EventHandler.js";
import { BrowserCacheManager } from "../cache/BrowserCacheManager.js";
import { BrowserConfiguration } from "../config/Configuration.js";
import { PopupWindowAttributes } from "../request/PopupWindowAttributes.js";
import { AuthenticationResult } from "../response/AuthenticationResult.js";
export type PopupParams = {
popup?: Window | null;
popupName: string;
popupWindowAttributes: PopupWindowAttributes;
popupWindowParent: Window;
};
export declare class PopupClient extends StandardInteractionClient {
private currentWindow;
protected nativeStorage: BrowserCacheManager;
constructor(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
* @param request
* @param pkceCodes
*/
acquireToken(request: PopupRequest, pkceCodes?: PkceCodes): Promise<AuthenticationResult>;
/**
* Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server
* @param logoutRequest
*/
logout(logoutRequest?: EndSessionPopupRequest): Promise<void>;
/**
* Helper which obtains an access_token for your API via opening a popup window in the user's browser
* @param request
* @param popupParams
* @param pkceCodes
*
* @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.
*/
protected acquireTokenPopupAsync(request: PopupRequest, popupParams: PopupParams, pkceCodes?: PkceCodes): Promise<AuthenticationResult>;
/**
*
* @param validRequest
* @param popupName
* @param requestAuthority
* @param popup
* @param mainWindowRedirectUri
* @param popupWindowAttributes
*/
protected logoutPopupAsync(validRequest: CommonEndSessionRequest, popupParams: PopupParams, requestAuthority?: string, mainWindowRedirectUri?: string): Promise<void>;
/**
* Opens a popup window with given request Url.
* @param requestUrl
*/
initiateAuthRequest(requestUrl: string, params: PopupParams): Window;
/**
* Monitors a window until it loads a url with the same origin.
* @param popupWindow - window that is being monitored
* @param timeout - timeout for processing hash once popup is redirected back to application
*/
monitorPopupForHash(popupWindow: Window, popupWindowParent: Window): Promise<string>;
/**
* @hidden
*
* Configures popup window for login.
*
* @param urlNavigate
* @param title
* @param popUpWidth
* @param popUpHeight
* @param popupWindowAttributes
* @ignore
* @hidden
*/
openPopup(urlNavigate: string, popupParams: PopupParams): Window;
/**
* Helper function to set popup window dimensions and position
* @param urlNavigate
* @param popupName
* @param popupWindowAttributes
* @returns
*/
openSizedPopup(urlNavigate: string, { popupName, popupWindowAttributes, popupWindowParent }: PopupParams): Window | null;
/**
* Event callback to unload main window.
*/
unloadWindow(e: Event): void;
/**
* Closes popup, removes any state vars created during popup calls.
* @param popupWindow
*/
cleanPopup(popupWindow: Window, popupWindowParent: Window): void;
/**
* Generates the name for the popup based on the client id and request
* @param clientId
* @param request
*/
generatePopupName(scopes: Array<string>, authority: string): string;
/**
* Generates the name for the popup based on the client id and request for logouts
* @param clientId
* @param request
*/
generateLogoutPopupName(request: CommonEndSessionRequest): string;
}
//# sourceMappingURL=PopupClient.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"PopupClient.d.ts","sourceRoot":"","sources":["../../../src/interaction_client/PopupClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,uBAAuB,EAMvB,kBAAkB,EAClB,MAAM,EACN,OAAO,EAKP,SAAS,EACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAO3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAKtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,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