@azure/msal-browser 4.5.1 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientNext.mjs +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AccountManager.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +9 -3
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/CacheHelpers.mjs +1 -1
- package/dist/cache/CookieStorage.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/LocalStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/SessionStorage.mjs +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +7 -7
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.mjs +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts +8 -0
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +50 -47
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.d.ts +1 -1
- package/dist/event/EventHandler.d.ts.map +1 -1
- package/dist/event/EventHandler.mjs +7 -5
- package/dist/event/EventHandler.mjs.map +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +11 -3
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +16 -8
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +3 -3
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +12 -5
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +19 -9
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts +1 -7
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +2 -22
- package/dist/interaction_client/StandardInteractionClient.mjs.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +2 -2
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +3 -3
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts +2 -2
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +3 -3
- package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +7 -7
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs.map +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/protocol/Authorize.d.ts +13 -0
- package/dist/protocol/Authorize.d.ts.map +1 -0
- package/dist/protocol/Authorize.mjs +74 -0
- package/dist/protocol/Authorize.mjs.map +1 -0
- package/dist/request/PopupRequest.d.ts +1 -2
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/RedirectRequest.d.ts +1 -2
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/RequestHelpers.mjs +1 -1
- package/dist/request/SilentRequest.d.ts +0 -1
- package/dist/request/SilentRequest.d.ts.map +1 -1
- package/dist/request/SsoSilentRequest.d.ts +2 -4
- package/dist/request/SsoSilentRequest.d.ts.map +1 -1
- package/dist/response/ResponseHandler.d.ts +3 -3
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/response/ResponseHandler.mjs.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +1049 -1053
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +1049 -1053
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +67 -65
- package/lib/types/cache/BrowserCacheManager.d.ts.map +1 -1
- package/lib/types/cache/TokenCache.d.ts.map +1 -1
- package/lib/types/controllers/StandardController.d.ts +8 -0
- package/lib/types/controllers/StandardController.d.ts.map +1 -1
- package/lib/types/event/EventHandler.d.ts +1 -1
- package/lib/types/event/EventHandler.d.ts.map +1 -1
- package/lib/types/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_client/PopupClient.d.ts.map +1 -1
- package/lib/types/interaction_client/RedirectClient.d.ts +3 -3
- package/lib/types/interaction_client/RedirectClient.d.ts.map +1 -1
- package/lib/types/interaction_client/SilentIframeClient.d.ts +1 -1
- package/lib/types/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/lib/types/interaction_client/StandardInteractionClient.d.ts +1 -7
- package/lib/types/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/lib/types/interaction_handler/InteractionHandler.d.ts +2 -2
- package/lib/types/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/lib/types/interaction_handler/RedirectHandler.d.ts +2 -2
- package/lib/types/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/lib/types/naa/mapping/NestedAppAuthAdapter.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/protocol/Authorize.d.ts +13 -0
- package/lib/types/protocol/Authorize.d.ts.map +1 -0
- package/lib/types/request/PopupRequest.d.ts +1 -2
- package/lib/types/request/PopupRequest.d.ts.map +1 -1
- package/lib/types/request/RedirectRequest.d.ts +1 -2
- package/lib/types/request/RedirectRequest.d.ts.map +1 -1
- package/lib/types/request/SilentRequest.d.ts +0 -1
- package/lib/types/request/SilentRequest.d.ts.map +1 -1
- package/lib/types/request/SsoSilentRequest.d.ts +2 -4
- package/lib/types/request/SsoSilentRequest.d.ts.map +1 -1
- package/lib/types/response/ResponseHandler.d.ts +3 -3
- package/lib/types/response/ResponseHandler.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cache/BrowserCacheManager.ts +8 -2
- package/src/cache/TokenCache.ts +8 -7
- package/src/controllers/StandardController.ts +66 -51
- package/src/event/EventHandler.ts +9 -5
- package/src/interaction_client/NativeInteractionClient.ts +14 -2
- package/src/interaction_client/PopupClient.ts +40 -21
- package/src/interaction_client/RedirectClient.ts +41 -22
- package/src/interaction_client/SilentIframeClient.ts +42 -29
- package/src/interaction_client/StandardInteractionClient.ts +0 -40
- package/src/interaction_handler/InteractionHandler.ts +4 -3
- package/src/interaction_handler/RedirectHandler.ts +4 -3
- package/src/naa/mapping/NestedAppAuthAdapter.ts +9 -8
- package/src/packageMetadata.ts +1 -1
- package/src/protocol/Authorize.ts +136 -0
- package/src/request/PopupRequest.ts +1 -5
- package/src/request/RedirectRequest.ts +1 -5
- package/src/request/SilentRequest.ts +0 -1
- package/src/request/SsoSilentRequest.ts +2 -7
- package/src/response/ResponseHandler.ts +3 -3
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
CcsCredential,
|
|
15
15
|
invokeAsync,
|
|
16
16
|
PerformanceEvents,
|
|
17
|
-
|
|
17
|
+
AuthorizeResponse,
|
|
18
|
+
AuthorizeProtocol,
|
|
18
19
|
} from "@azure/msal-common/browser";
|
|
19
20
|
import {
|
|
20
21
|
createBrowserAuthError,
|
|
@@ -143,7 +144,7 @@ export class RedirectHandler {
|
|
|
143
144
|
* @param hash
|
|
144
145
|
*/
|
|
145
146
|
async handleCodeResponse(
|
|
146
|
-
response:
|
|
147
|
+
response: AuthorizeResponse,
|
|
147
148
|
state: string
|
|
148
149
|
): Promise<AuthenticationResult> {
|
|
149
150
|
this.logger.verbose("RedirectHandler.handleCodeResponse called");
|
|
@@ -163,7 +164,7 @@ export class RedirectHandler {
|
|
|
163
164
|
|
|
164
165
|
let authCodeResponse;
|
|
165
166
|
try {
|
|
166
|
-
authCodeResponse =
|
|
167
|
+
authCodeResponse = AuthorizeProtocol.getAuthorizationCodePayload(
|
|
167
168
|
response,
|
|
168
169
|
requestState
|
|
169
170
|
);
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
AccessTokenEntity,
|
|
30
30
|
TenantProfile,
|
|
31
31
|
buildTenantProfile,
|
|
32
|
+
TimeUtils,
|
|
32
33
|
} from "@azure/msal-common/browser";
|
|
33
34
|
import { isBridgeError } from "../BridgeError.js";
|
|
34
35
|
import { BridgeStatusCode } from "../BridgeStatusCode.js";
|
|
@@ -74,8 +75,7 @@ export class NestedAppAuthAdapter {
|
|
|
74
75
|
|
|
75
76
|
const correlationId =
|
|
76
77
|
request.correlationId || this.crypto.createNewGuid();
|
|
77
|
-
const
|
|
78
|
-
const claims = requestBuilder.addClientCapabilitiesToClaims(
|
|
78
|
+
const claims = RequestParameterBuilder.addClientCapabilitiesToClaims(
|
|
79
79
|
request.claims,
|
|
80
80
|
this.clientCapabilities
|
|
81
81
|
);
|
|
@@ -105,8 +105,9 @@ export class NestedAppAuthAdapter {
|
|
|
105
105
|
throw createClientAuthError(ClientAuthErrorCodes.nullOrEmptyToken);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
// Request timestamp and AuthResult expires_in are in seconds, converting to Date for AuthenticationResult
|
|
109
|
+
const expiresOn = TimeUtils.toDateFromSeconds(
|
|
110
|
+
reqTimestamp + (response.token.expires_in || 0)
|
|
110
111
|
);
|
|
111
112
|
const idTokenClaims = AuthToken.extractTokenClaims(
|
|
112
113
|
response.token.id_token,
|
|
@@ -304,13 +305,13 @@ export class NestedAppAuthAdapter {
|
|
|
304
305
|
idTokenClaims: idTokenClaims || {},
|
|
305
306
|
accessToken: accessToken.secret,
|
|
306
307
|
fromCache: true,
|
|
307
|
-
expiresOn:
|
|
308
|
+
expiresOn: TimeUtils.toDateFromSeconds(accessToken.expiresOn),
|
|
309
|
+
extExpiresOn: TimeUtils.toDateFromSeconds(
|
|
310
|
+
accessToken.extendedExpiresOn
|
|
311
|
+
),
|
|
308
312
|
tokenType:
|
|
309
313
|
request.authenticationScheme || AuthenticationScheme.BEARER,
|
|
310
314
|
correlationId,
|
|
311
|
-
extExpiresOn: new Date(
|
|
312
|
-
Number(accessToken.extendedExpiresOn) * 1000
|
|
313
|
-
),
|
|
314
315
|
state: request.state,
|
|
315
316
|
};
|
|
316
317
|
|
package/src/packageMetadata.ts
CHANGED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
AuthenticationScheme,
|
|
8
|
+
Authority,
|
|
9
|
+
AuthorizeProtocol,
|
|
10
|
+
ClientConfigurationErrorCodes,
|
|
11
|
+
CommonAuthorizationUrlRequest,
|
|
12
|
+
createClientConfigurationError,
|
|
13
|
+
invokeAsync,
|
|
14
|
+
IPerformanceClient,
|
|
15
|
+
Logger,
|
|
16
|
+
PerformanceEvents,
|
|
17
|
+
PopTokenGenerator,
|
|
18
|
+
ProtocolMode,
|
|
19
|
+
RequestParameterBuilder,
|
|
20
|
+
Constants,
|
|
21
|
+
} from "@azure/msal-common/browser";
|
|
22
|
+
import { BrowserConfiguration } from "../config/Configuration.js";
|
|
23
|
+
import { BrowserConstants } from "../utils/BrowserConstants.js";
|
|
24
|
+
import { version } from "../packageMetadata.js";
|
|
25
|
+
import { CryptoOps } from "../crypto/CryptoOps.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns map of parameters that are applicable to all calls to /authorize whether using PKCE or EAR
|
|
29
|
+
* @param config
|
|
30
|
+
* @param authority
|
|
31
|
+
* @param request
|
|
32
|
+
* @param logger
|
|
33
|
+
* @param performanceClient
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
async function getStandardParameters(
|
|
37
|
+
config: BrowserConfiguration,
|
|
38
|
+
authority: Authority,
|
|
39
|
+
request: CommonAuthorizationUrlRequest,
|
|
40
|
+
logger: Logger,
|
|
41
|
+
performanceClient: IPerformanceClient
|
|
42
|
+
): Promise<Map<string, string>> {
|
|
43
|
+
const parameters = AuthorizeProtocol.getStandardAuthorizeRequestParameters(
|
|
44
|
+
{ ...config.auth, authority: authority },
|
|
45
|
+
request,
|
|
46
|
+
logger,
|
|
47
|
+
performanceClient
|
|
48
|
+
);
|
|
49
|
+
RequestParameterBuilder.addLibraryInfo(parameters, {
|
|
50
|
+
sku: BrowserConstants.MSAL_SKU,
|
|
51
|
+
version: version,
|
|
52
|
+
os: "",
|
|
53
|
+
cpu: "",
|
|
54
|
+
});
|
|
55
|
+
if (config.auth.protocolMode !== ProtocolMode.OIDC) {
|
|
56
|
+
RequestParameterBuilder.addApplicationTelemetry(
|
|
57
|
+
parameters,
|
|
58
|
+
config.telemetry.application
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (request.platformBroker) {
|
|
63
|
+
// signal ests that this is a WAM call
|
|
64
|
+
RequestParameterBuilder.addNativeBroker(parameters);
|
|
65
|
+
|
|
66
|
+
// pass the req_cnf for POP
|
|
67
|
+
if (request.authenticationScheme === AuthenticationScheme.POP) {
|
|
68
|
+
const cryptoOps = new CryptoOps(logger, performanceClient);
|
|
69
|
+
const popTokenGenerator = new PopTokenGenerator(cryptoOps);
|
|
70
|
+
|
|
71
|
+
// req_cnf is always sent as a string for SPAs
|
|
72
|
+
let reqCnfData;
|
|
73
|
+
if (!request.popKid) {
|
|
74
|
+
const generatedReqCnfData = await invokeAsync(
|
|
75
|
+
popTokenGenerator.generateCnf.bind(popTokenGenerator),
|
|
76
|
+
PerformanceEvents.PopTokenGenerateCnf,
|
|
77
|
+
logger,
|
|
78
|
+
performanceClient,
|
|
79
|
+
request.correlationId
|
|
80
|
+
)(request, logger);
|
|
81
|
+
reqCnfData = generatedReqCnfData.reqCnfString;
|
|
82
|
+
} else {
|
|
83
|
+
reqCnfData = cryptoOps.encodeKid(request.popKid);
|
|
84
|
+
}
|
|
85
|
+
RequestParameterBuilder.addPopToken(parameters, reqCnfData);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
RequestParameterBuilder.instrumentBrokerParams(
|
|
90
|
+
parameters,
|
|
91
|
+
request.correlationId,
|
|
92
|
+
performanceClient
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
return parameters;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets the full /authorize URL with request parameters when using Auth Code + PKCE
|
|
100
|
+
* @param config
|
|
101
|
+
* @param authority
|
|
102
|
+
* @param request
|
|
103
|
+
* @param logger
|
|
104
|
+
* @param performanceClient
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
export async function getAuthCodeRequestUrl(
|
|
108
|
+
config: BrowserConfiguration,
|
|
109
|
+
authority: Authority,
|
|
110
|
+
request: CommonAuthorizationUrlRequest,
|
|
111
|
+
logger: Logger,
|
|
112
|
+
performanceClient: IPerformanceClient
|
|
113
|
+
): Promise<string> {
|
|
114
|
+
if (!request.codeChallenge) {
|
|
115
|
+
throw createClientConfigurationError(
|
|
116
|
+
ClientConfigurationErrorCodes.pkceParamsMissing
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const parameters = await invokeAsync(
|
|
121
|
+
getStandardParameters,
|
|
122
|
+
PerformanceEvents.GetStandardParams,
|
|
123
|
+
logger,
|
|
124
|
+
performanceClient,
|
|
125
|
+
request.correlationId
|
|
126
|
+
)(config, authority, request, logger, performanceClient);
|
|
127
|
+
RequestParameterBuilder.addResponseTypeCode(parameters);
|
|
128
|
+
|
|
129
|
+
RequestParameterBuilder.addCodeChallengeParams(
|
|
130
|
+
parameters,
|
|
131
|
+
request.codeChallenge,
|
|
132
|
+
Constants.S256_CODE_CHALLENGE_METHOD
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
return AuthorizeProtocol.getAuthorizeUrl(authority, parameters);
|
|
136
|
+
}
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CommonAuthorizationUrlRequest,
|
|
8
|
-
StringDict,
|
|
9
|
-
} from "@azure/msal-common/browser";
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
10
7
|
import { PopupWindowAttributes } from "./PopupWindowAttributes.js";
|
|
11
8
|
|
|
12
9
|
/**
|
|
@@ -51,6 +48,5 @@ export type PopupRequest = Partial<
|
|
|
51
48
|
> & {
|
|
52
49
|
scopes: Array<string>;
|
|
53
50
|
popupWindowAttributes?: PopupWindowAttributes;
|
|
54
|
-
tokenBodyParameters?: StringDict;
|
|
55
51
|
popupWindowParent?: Window;
|
|
56
52
|
};
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CommonAuthorizationUrlRequest,
|
|
8
|
-
StringDict,
|
|
9
|
-
} from "@azure/msal-common/browser";
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* RedirectRequest: Request object passed by user to retrieve a Code from the
|
|
@@ -55,5 +52,4 @@ export type RedirectRequest = Partial<
|
|
|
55
52
|
* Set onRedirectNavigate in Configuration instead.
|
|
56
53
|
*/
|
|
57
54
|
onRedirectNavigate?: (url: string) => boolean | void;
|
|
58
|
-
tokenBodyParameters?: StringDict;
|
|
59
55
|
};
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
CommonAuthorizationUrlRequest,
|
|
8
|
-
StringDict,
|
|
9
|
-
} from "@azure/msal-common/browser";
|
|
6
|
+
import { CommonAuthorizationUrlRequest } from "@azure/msal-common/browser";
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* Request object passed by user to ssoSilent to retrieve a Code from the server (first leg of authorization code grant flow)
|
|
@@ -42,6 +39,4 @@ export type SsoSilentRequest = Partial<
|
|
|
42
39
|
| "requestedClaimsHash"
|
|
43
40
|
| "platformBroker"
|
|
44
41
|
>
|
|
45
|
-
|
|
46
|
-
tokenBodyParameters?: StringDict;
|
|
47
|
-
};
|
|
42
|
+
>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import {
|
|
7
7
|
ICrypto,
|
|
8
8
|
Logger,
|
|
9
|
-
|
|
9
|
+
AuthorizeResponse,
|
|
10
10
|
UrlUtils,
|
|
11
11
|
} from "@azure/msal-common/browser";
|
|
12
12
|
import {
|
|
@@ -20,7 +20,7 @@ export function deserializeResponse(
|
|
|
20
20
|
responseString: string,
|
|
21
21
|
responseLocation: string,
|
|
22
22
|
logger: Logger
|
|
23
|
-
):
|
|
23
|
+
): AuthorizeResponse {
|
|
24
24
|
// Deserialize hash fragment response parameters.
|
|
25
25
|
const serverParams = UrlUtils.getDeserializedResponse(responseString);
|
|
26
26
|
if (!serverParams) {
|
|
@@ -49,7 +49,7 @@ export function deserializeResponse(
|
|
|
49
49
|
* Returns the interaction type that the response object belongs to
|
|
50
50
|
*/
|
|
51
51
|
export function validateInteractionType(
|
|
52
|
-
response:
|
|
52
|
+
response: AuthorizeResponse,
|
|
53
53
|
browserCrypto: ICrypto,
|
|
54
54
|
interactionType: InteractionType
|
|
55
55
|
): void {
|