@azure/msal-node 2.7.0-alpha.0 → 2.7.1-alpha.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/README.md +1 -1
- package/dist/cache/ITokenCache.d.ts +15 -15
- package/dist/cache/NodeStorage.cjs +423 -423
- package/dist/cache/NodeStorage.cjs.map +1 -1
- package/dist/cache/NodeStorage.d.ts +193 -193
- package/dist/cache/NodeStorage.d.ts.map +1 -1
- package/dist/cache/NodeStorage.mjs +424 -424
- package/dist/cache/NodeStorage.mjs.map +1 -1
- package/dist/cache/TokenCache.cjs +265 -265
- package/dist/cache/TokenCache.d.ts +90 -90
- package/dist/cache/TokenCache.mjs +265 -265
- package/dist/cache/distributed/DistributedCachePlugin.cjs +26 -26
- package/dist/cache/distributed/DistributedCachePlugin.d.ts +10 -10
- package/dist/cache/distributed/DistributedCachePlugin.mjs +26 -26
- package/dist/cache/distributed/ICacheClient.d.ts +17 -17
- package/dist/cache/distributed/IPartitionManager.d.ts +28 -28
- package/dist/cache/serializer/Deserializer.cjs +167 -170
- package/dist/cache/serializer/Deserializer.cjs.map +1 -1
- package/dist/cache/serializer/Deserializer.d.ts +42 -42
- package/dist/cache/serializer/Deserializer.d.ts.map +1 -1
- package/dist/cache/serializer/Deserializer.mjs +168 -171
- package/dist/cache/serializer/Deserializer.mjs.map +1 -1
- package/dist/cache/serializer/Serializer.cjs +137 -137
- package/dist/cache/serializer/Serializer.d.ts +39 -39
- package/dist/cache/serializer/Serializer.mjs +137 -137
- package/dist/cache/serializer/SerializerTypes.d.ts +102 -102
- package/dist/client/ClientApplication.cjs +335 -333
- package/dist/client/ClientApplication.cjs.map +1 -1
- package/dist/client/ClientApplication.d.ts +143 -142
- package/dist/client/ClientApplication.d.ts.map +1 -1
- package/dist/client/ClientApplication.mjs +336 -334
- package/dist/client/ClientApplication.mjs.map +1 -1
- package/dist/client/ClientAssertion.cjs +116 -116
- package/dist/client/ClientAssertion.d.ts +46 -46
- package/dist/client/ClientAssertion.mjs +116 -116
- package/dist/client/ClientCredentialClient.cjs +194 -194
- package/dist/client/ClientCredentialClient.cjs.map +1 -1
- package/dist/client/ClientCredentialClient.d.ts +33 -33
- package/dist/client/ClientCredentialClient.d.ts.map +1 -1
- package/dist/client/ClientCredentialClient.mjs +195 -195
- package/dist/client/ClientCredentialClient.mjs.map +1 -1
- package/dist/client/ConfidentialClientApplication.cjs +166 -163
- package/dist/client/ConfidentialClientApplication.cjs.map +1 -1
- package/dist/client/ConfidentialClientApplication.d.ts +58 -58
- package/dist/client/ConfidentialClientApplication.d.ts.map +1 -1
- package/dist/client/ConfidentialClientApplication.mjs +168 -165
- package/dist/client/ConfidentialClientApplication.mjs.map +1 -1
- package/dist/client/DeviceCodeClient.cjs +207 -207
- package/dist/client/DeviceCodeClient.d.ts +53 -53
- package/dist/client/DeviceCodeClient.mjs +207 -207
- package/dist/client/IConfidentialClientApplication.d.ts +39 -39
- package/dist/client/IPublicClientApplication.d.ts +42 -42
- package/dist/client/ManagedIdentityApplication.cjs +75 -80
- package/dist/client/ManagedIdentityApplication.cjs.map +1 -1
- package/dist/client/ManagedIdentityApplication.d.ts +23 -23
- package/dist/client/ManagedIdentityApplication.d.ts.map +1 -1
- package/dist/client/ManagedIdentityApplication.mjs +76 -81
- package/dist/client/ManagedIdentityApplication.mjs.map +1 -1
- package/dist/client/ManagedIdentityClient.cjs +40 -36
- package/dist/client/ManagedIdentityClient.cjs.map +1 -1
- package/dist/client/ManagedIdentityClient.d.ts +19 -24
- package/dist/client/ManagedIdentityClient.d.ts.map +1 -1
- package/dist/client/ManagedIdentityClient.mjs +40 -36
- package/dist/client/ManagedIdentityClient.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.cjs +42 -69
- package/dist/client/ManagedIdentitySources/AppService.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.d.ts +16 -16
- package/dist/client/ManagedIdentitySources/AppService.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AppService.mjs +43 -70
- package/dist/client/ManagedIdentitySources/AppService.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.cjs +81 -92
- package/dist/client/ManagedIdentitySources/AzureArc.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts +18 -18
- package/dist/client/ManagedIdentitySources/AzureArc.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/AzureArc.mjs +84 -95
- package/dist/client/ManagedIdentitySources/AzureArc.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs +116 -77
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts +30 -18
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +118 -80
- package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.cjs +47 -0
- package/dist/client/ManagedIdentitySources/CloudShell.cjs.map +1 -0
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts +15 -6
- package/dist/client/ManagedIdentitySources/CloudShell.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/CloudShell.mjs +45 -0
- package/dist/client/ManagedIdentitySources/CloudShell.mjs.map +1 -0
- package/dist/client/ManagedIdentitySources/Imds.cjs +43 -52
- package/dist/client/ManagedIdentitySources/Imds.cjs.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.d.ts +12 -12
- package/dist/client/ManagedIdentitySources/Imds.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/Imds.mjs +44 -53
- package/dist/client/ManagedIdentitySources/Imds.mjs.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs +61 -0
- package/dist/client/ManagedIdentitySources/ServiceFabric.cjs.map +1 -0
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts +16 -6
- package/dist/client/ManagedIdentitySources/ServiceFabric.d.ts.map +1 -1
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +59 -0
- package/dist/client/ManagedIdentitySources/ServiceFabric.mjs.map +1 -0
- package/dist/client/OnBehalfOfClient.cjs +202 -202
- package/dist/client/OnBehalfOfClient.cjs.map +1 -1
- package/dist/client/OnBehalfOfClient.d.ts +47 -47
- package/dist/client/OnBehalfOfClient.d.ts.map +1 -1
- package/dist/client/OnBehalfOfClient.mjs +203 -203
- package/dist/client/OnBehalfOfClient.mjs.map +1 -1
- package/dist/client/PublicClientApplication.cjs +229 -229
- package/dist/client/PublicClientApplication.d.ts +71 -71
- package/dist/client/PublicClientApplication.mjs +229 -229
- package/dist/client/UsernamePasswordClient.cjs +95 -95
- package/dist/client/UsernamePasswordClient.cjs.map +1 -1
- package/dist/client/UsernamePasswordClient.d.ts +25 -25
- package/dist/client/UsernamePasswordClient.d.ts.map +1 -1
- package/dist/client/UsernamePasswordClient.mjs +96 -96
- package/dist/client/UsernamePasswordClient.mjs.map +1 -1
- package/dist/config/Configuration.cjs +102 -86
- package/dist/config/Configuration.cjs.map +1 -1
- package/dist/config/Configuration.d.ts +126 -122
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.mjs +102 -86
- package/dist/config/Configuration.mjs.map +1 -1
- package/dist/config/ManagedIdentityId.cjs +48 -48
- package/dist/config/ManagedIdentityId.d.ts +11 -11
- package/dist/config/ManagedIdentityId.mjs +48 -48
- package/dist/config/ManagedIdentityRequestParameters.cjs +28 -29
- package/dist/config/ManagedIdentityRequestParameters.cjs.map +1 -1
- package/dist/config/ManagedIdentityRequestParameters.d.ts +11 -11
- package/dist/config/ManagedIdentityRequestParameters.d.ts.map +1 -1
- package/dist/config/ManagedIdentityRequestParameters.mjs +28 -29
- package/dist/config/ManagedIdentityRequestParameters.mjs.map +1 -1
- package/dist/crypto/CryptoProvider.cjs +75 -75
- package/dist/crypto/CryptoProvider.d.ts +52 -52
- package/dist/crypto/CryptoProvider.mjs +75 -75
- package/dist/crypto/GuidGenerator.cjs +22 -22
- package/dist/crypto/GuidGenerator.d.ts +14 -14
- package/dist/crypto/GuidGenerator.mjs +22 -22
- package/dist/crypto/HashUtils.cjs +13 -13
- package/dist/crypto/HashUtils.d.ts +8 -8
- package/dist/crypto/HashUtils.mjs +13 -13
- package/dist/crypto/PkceGenerator.cjs +49 -49
- package/dist/crypto/PkceGenerator.d.ts +22 -22
- package/dist/crypto/PkceGenerator.mjs +49 -49
- package/dist/error/ManagedIdentityError.cjs +38 -28
- package/dist/error/ManagedIdentityError.cjs.map +1 -1
- package/dist/error/ManagedIdentityError.d.ts +26 -21
- package/dist/error/ManagedIdentityError.d.ts.map +1 -1
- package/dist/error/ManagedIdentityError.mjs +39 -29
- package/dist/error/ManagedIdentityError.mjs.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.cjs +26 -15
- package/dist/error/ManagedIdentityErrorCodes.cjs.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.d.ts +18 -9
- package/dist/error/ManagedIdentityErrorCodes.d.ts.map +1 -1
- package/dist/error/ManagedIdentityErrorCodes.mjs +23 -14
- package/dist/error/ManagedIdentityErrorCodes.mjs.map +1 -1
- package/dist/error/NodeAuthError.cjs +85 -85
- package/dist/error/NodeAuthError.d.ts +65 -65
- package/dist/error/NodeAuthError.mjs +85 -85
- package/dist/index.cjs +21 -21
- package/dist/index.d.ts +44 -44
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internals.cjs +8 -8
- package/dist/internals.d.ts +6 -6
- package/dist/internals.mjs +8 -8
- package/dist/network/HttpClient.cjs +281 -283
- package/dist/network/HttpClient.cjs.map +1 -1
- package/dist/network/HttpClient.d.ts +25 -26
- package/dist/network/HttpClient.d.ts.map +1 -1
- package/dist/network/HttpClient.mjs +281 -283
- package/dist/network/HttpClient.mjs.map +1 -1
- package/dist/network/HttpClientWithRetries.cjs +44 -0
- package/dist/network/HttpClientWithRetries.cjs.map +1 -0
- package/dist/network/HttpClientWithRetries.d.ts +12 -0
- package/dist/network/HttpClientWithRetries.d.ts.map +1 -0
- package/dist/network/HttpClientWithRetries.mjs +42 -0
- package/dist/network/HttpClientWithRetries.mjs.map +1 -0
- package/dist/network/ILoopbackClient.d.ts +10 -10
- package/dist/network/LoopbackClient.cjs +77 -77
- package/dist/network/LoopbackClient.d.ts +21 -21
- package/dist/network/LoopbackClient.mjs +77 -77
- package/dist/packageMetadata.cjs +4 -4
- package/dist/packageMetadata.d.ts +2 -2
- package/dist/packageMetadata.mjs +4 -4
- package/dist/request/AuthorizationCodeRequest.d.ts +21 -21
- package/dist/request/AuthorizationUrlRequest.d.ts +33 -33
- package/dist/request/ClientCredentialRequest.d.ts +14 -14
- package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
- package/dist/request/DeviceCodeRequest.d.ts +15 -15
- package/dist/request/InteractiveRequest.d.ts +22 -22
- package/dist/request/ManagedIdentityRequest.d.ts +8 -8
- package/dist/request/ManagedIdentityRequestParams.d.ts +9 -9
- package/dist/request/OnBehalfOfRequest.d.ts +14 -14
- package/dist/request/RefreshTokenRequest.d.ts +17 -17
- package/dist/request/SignOutRequest.d.ts +5 -5
- package/dist/request/SilentFlowRequest.d.ts +16 -16
- package/dist/request/UsernamePasswordRequest.d.ts +19 -19
- package/dist/response/ManagedIdentityTokenResponse.d.ts +24 -24
- package/dist/retry/IHttpRetryPolicy.d.ts +6 -0
- package/dist/retry/IHttpRetryPolicy.d.ts.map +1 -0
- package/dist/retry/LinearRetryPolicy.cjs +47 -0
- package/dist/retry/LinearRetryPolicy.cjs.map +1 -0
- package/dist/retry/LinearRetryPolicy.d.ts +12 -0
- package/dist/retry/LinearRetryPolicy.d.ts.map +1 -0
- package/dist/retry/LinearRetryPolicy.mjs +45 -0
- package/dist/retry/LinearRetryPolicy.mjs.map +1 -0
- package/dist/utils/Constants.cjs +142 -103
- package/dist/utils/Constants.cjs.map +1 -1
- package/dist/utils/Constants.d.ts +132 -106
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +134 -100
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/EncodingUtils.cjs +44 -44
- package/dist/utils/EncodingUtils.d.ts +26 -26
- package/dist/utils/EncodingUtils.mjs +44 -44
- package/dist/utils/NetworkUtils.cjs +38 -38
- package/dist/utils/NetworkUtils.d.ts +5 -5
- package/dist/utils/NetworkUtils.mjs +38 -38
- package/package.json +5 -5
- package/src/cache/NodeStorage.ts +4 -9
- package/src/cache/serializer/Deserializer.ts +1 -5
- package/src/client/ClientApplication.ts +24 -10
- package/src/client/ClientCredentialClient.ts +14 -6
- package/src/client/ConfidentialClientApplication.ts +10 -5
- package/src/client/ManagedIdentityApplication.ts +8 -16
- package/src/client/ManagedIdentityClient.ts +23 -11
- package/src/client/ManagedIdentitySources/AppService.ts +68 -97
- package/src/client/ManagedIdentitySources/AzureArc.ts +59 -68
- package/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +82 -11
- package/src/client/ManagedIdentitySources/CloudShell.ts +93 -8
- package/src/client/ManagedIdentitySources/Imds.ts +54 -40
- package/src/client/ManagedIdentitySources/ServiceFabric.ts +126 -5
- package/src/client/OnBehalfOfClient.ts +18 -7
- package/src/client/UsernamePasswordClient.ts +16 -7
- package/src/config/Configuration.ts +50 -18
- package/src/config/ManagedIdentityRequestParameters.ts +1 -6
- package/src/error/ManagedIdentityError.ts +15 -4
- package/src/error/ManagedIdentityErrorCodes.ts +19 -1
- package/src/index.ts +1 -0
- package/src/network/HttpClient.ts +27 -39
- package/src/network/HttpClientWithRetries.ts +80 -0
- package/src/packageMetadata.ts +1 -1
- package/src/request/ClientCredentialRequest.ts +6 -3
- package/src/retry/IHttpRetryPolicy.ts +18 -0
- package/src/retry/LinearRetryPolicy.ts +71 -0
- package/src/utils/Constants.ts +47 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientApplication.mjs","sources":["../../src/client/ClientApplication.ts"],"sourcesContent":[null],"names":["NodeConstants","Constants"],"mappings":";;;;;;;;;;;;AAAA;;;AAGG;AAoDH;;;AAGG;MACmB,iBAAiB,CAAA;AAyBnC;;AAEG;AACH,IAAA,WAAA,CAAsB,aAA4B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAC3C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,EACJ,OAAO,CACV,CAAC;AACF,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAC1B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACzB,IAAI,CAAC,cAAc,EACnB,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAChD,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAC5B,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAChC,CAAC;KACL;AAED;;;;;;;;AAQG;IACH,MAAM,cAAc,CAAC,OAAgC,EAAA;QACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;AACjE,QAAA,MAAM,YAAY,GAAkC;AAChD,YAAA,GAAG,OAAO;YACV,IAAI,MAAM,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC9C,YAAA,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,YAAY,CAAC,KAAK;YACxD,oBAAoB,EAAE,oBAAoB,CAAC,MAAM;SACpD,CAAC;QAEF,MAAM,gBAAgB,GAAG,MAAM,I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CAAC,IAAI,CAAC,sBAAsB;AAC/D,YAAA,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB;YACrD,wBAAwB;AACxB,YAAA,0BAA0B,EACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B;SAClD,CAAC;QAEF,OAAO,gBAAgB,CAAC,wBAAwB,CAC5C,YAAY,EACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,CAAC,OAAO,EACZ,gBAAgB,EAChB,IAAI,CAAC,MAAM,CACd,CAAC;KACL;AAED;;AAEG;IACH,UAAU,GAAA;AACN,QAAA,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;KAC7B;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"ClientApplication.mjs","sources":["../../src/client/ClientApplication.ts"],"sourcesContent":[null],"names":["NodeConstants","Constants"],"mappings":";;;;;;;;;;;;;AAAA;;;AAGG;AAuDH;;;AAGG;MACmB,iBAAiB,CAAA;AA4BnC;;AAEG;AACH,IAAA,WAAA,CAAsB,aAA4B,EAAA;AAC9C,QAAA,IAAI,CAAC,MAAM,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;AACnD,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAC3C,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAChC,IAAI,EACJ,OAAO,CACV,CAAC;AACF,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAC1B,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EACzB,IAAI,CAAC,cAAc,EACnB,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAChD,CAAC;QACF,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAC5B,IAAI,CAA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
/*! @azure/msal-node v2.7.1-alpha.0 2024-05-01 */
|
|
2
2
|
'use strict';
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -7,121 +7,121 @@ var msalCommon = require('@azure/msal-common');
|
|
|
7
7
|
var EncodingUtils = require('../utils/EncodingUtils.cjs');
|
|
8
8
|
var Constants = require('../utils/Constants.cjs');
|
|
9
9
|
|
|
10
|
-
/*
|
|
11
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
|
-
* Licensed under the MIT License.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Client assertion of type jwt-bearer used in confidential client flows
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
class ClientAssertion {
|
|
19
|
-
/**
|
|
20
|
-
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
21
|
-
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
22
|
-
*/
|
|
23
|
-
static fromAssertion(assertion) {
|
|
24
|
-
const clientAssertion = new ClientAssertion();
|
|
25
|
-
clientAssertion.jwt = assertion;
|
|
26
|
-
return clientAssertion;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
30
|
-
* @param thumbprint - identifier of a certificate
|
|
31
|
-
* @param privateKey - secret key
|
|
32
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
33
|
-
*/
|
|
34
|
-
static fromCertificate(thumbprint, privateKey, publicCertificate) {
|
|
35
|
-
const clientAssertion = new ClientAssertion();
|
|
36
|
-
clientAssertion.privateKey = privateKey;
|
|
37
|
-
clientAssertion.thumbprint = thumbprint;
|
|
38
|
-
if (publicCertificate) {
|
|
39
|
-
clientAssertion.publicCertificate =
|
|
40
|
-
this.parseCertificate(publicCertificate);
|
|
41
|
-
}
|
|
42
|
-
return clientAssertion;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
46
|
-
* @param cryptoProvider - library's crypto helper
|
|
47
|
-
* @param issuer - iss claim
|
|
48
|
-
* @param jwtAudience - aud claim
|
|
49
|
-
*/
|
|
50
|
-
getJwt(cryptoProvider, issuer, jwtAudience) {
|
|
51
|
-
// if assertion was created from certificate, check if jwt is expired and create new one.
|
|
52
|
-
if (this.privateKey && this.thumbprint) {
|
|
53
|
-
if (this.jwt &&
|
|
54
|
-
!this.isExpired() &&
|
|
55
|
-
issuer === this.issuer &&
|
|
56
|
-
jwtAudience === this.jwtAudience) {
|
|
57
|
-
return this.jwt;
|
|
58
|
-
}
|
|
59
|
-
return this.createJwt(cryptoProvider, issuer, jwtAudience);
|
|
60
|
-
}
|
|
61
|
-
/*
|
|
62
|
-
* if assertion was created by caller, then we just append it. It is up to the caller to
|
|
63
|
-
* ensure that it contains necessary claims and that it is not expired.
|
|
64
|
-
*/
|
|
65
|
-
if (this.jwt) {
|
|
66
|
-
return this.jwt;
|
|
67
|
-
}
|
|
68
|
-
throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidAssertion);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
72
|
-
*/
|
|
73
|
-
createJwt(cryptoProvider, issuer, jwtAudience) {
|
|
74
|
-
this.issuer = issuer;
|
|
75
|
-
this.jwtAudience = jwtAudience;
|
|
76
|
-
const issuedAt = msalCommon.TimeUtils.nowSeconds();
|
|
77
|
-
this.expirationTime = issuedAt + 600;
|
|
78
|
-
const header = {
|
|
79
|
-
alg: Constants.JwtConstants.RSA_256,
|
|
80
|
-
x5t: EncodingUtils.EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
|
|
81
|
-
};
|
|
82
|
-
if (this.publicCertificate) {
|
|
83
|
-
Object.assign(header, {
|
|
84
|
-
x5c: this.publicCertificate,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
const payload = {
|
|
88
|
-
[Constants.JwtConstants.AUDIENCE]: this.jwtAudience,
|
|
89
|
-
[Constants.JwtConstants.EXPIRATION_TIME]: this.expirationTime,
|
|
90
|
-
[Constants.JwtConstants.ISSUER]: this.issuer,
|
|
91
|
-
[Constants.JwtConstants.SUBJECT]: this.issuer,
|
|
92
|
-
[Constants.JwtConstants.NOT_BEFORE]: issuedAt,
|
|
93
|
-
[Constants.JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
|
|
94
|
-
};
|
|
95
|
-
this.jwt = jwt.sign(payload, this.privateKey, { header });
|
|
96
|
-
return this.jwt;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Utility API to check expiration
|
|
100
|
-
*/
|
|
101
|
-
isExpired() {
|
|
102
|
-
return this.expirationTime < msalCommon.TimeUtils.nowSeconds();
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
106
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
107
|
-
*/
|
|
108
|
-
static parseCertificate(publicCertificate) {
|
|
109
|
-
/**
|
|
110
|
-
* This is regex to identify the certs in a given certificate string.
|
|
111
|
-
* We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
|
|
112
|
-
* The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
|
|
113
|
-
* "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
|
|
114
|
-
* The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
|
|
115
|
-
*/
|
|
116
|
-
const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
|
|
117
|
-
const certs = [];
|
|
118
|
-
let matches;
|
|
119
|
-
while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
|
|
120
|
-
// matches[1] represents the first parens capture group in the regex.
|
|
121
|
-
certs.push(matches[1].replace(/\r*\n/g, msalCommon.Constants.EMPTY_STRING));
|
|
122
|
-
}
|
|
123
|
-
return certs;
|
|
124
|
-
}
|
|
10
|
+
/*
|
|
11
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
|
+
* Licensed under the MIT License.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Client assertion of type jwt-bearer used in confidential client flows
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
class ClientAssertion {
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
21
|
+
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
22
|
+
*/
|
|
23
|
+
static fromAssertion(assertion) {
|
|
24
|
+
const clientAssertion = new ClientAssertion();
|
|
25
|
+
clientAssertion.jwt = assertion;
|
|
26
|
+
return clientAssertion;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
30
|
+
* @param thumbprint - identifier of a certificate
|
|
31
|
+
* @param privateKey - secret key
|
|
32
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
33
|
+
*/
|
|
34
|
+
static fromCertificate(thumbprint, privateKey, publicCertificate) {
|
|
35
|
+
const clientAssertion = new ClientAssertion();
|
|
36
|
+
clientAssertion.privateKey = privateKey;
|
|
37
|
+
clientAssertion.thumbprint = thumbprint;
|
|
38
|
+
if (publicCertificate) {
|
|
39
|
+
clientAssertion.publicCertificate =
|
|
40
|
+
this.parseCertificate(publicCertificate);
|
|
41
|
+
}
|
|
42
|
+
return clientAssertion;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
46
|
+
* @param cryptoProvider - library's crypto helper
|
|
47
|
+
* @param issuer - iss claim
|
|
48
|
+
* @param jwtAudience - aud claim
|
|
49
|
+
*/
|
|
50
|
+
getJwt(cryptoProvider, issuer, jwtAudience) {
|
|
51
|
+
// if assertion was created from certificate, check if jwt is expired and create new one.
|
|
52
|
+
if (this.privateKey && this.thumbprint) {
|
|
53
|
+
if (this.jwt &&
|
|
54
|
+
!this.isExpired() &&
|
|
55
|
+
issuer === this.issuer &&
|
|
56
|
+
jwtAudience === this.jwtAudience) {
|
|
57
|
+
return this.jwt;
|
|
58
|
+
}
|
|
59
|
+
return this.createJwt(cryptoProvider, issuer, jwtAudience);
|
|
60
|
+
}
|
|
61
|
+
/*
|
|
62
|
+
* if assertion was created by caller, then we just append it. It is up to the caller to
|
|
63
|
+
* ensure that it contains necessary claims and that it is not expired.
|
|
64
|
+
*/
|
|
65
|
+
if (this.jwt) {
|
|
66
|
+
return this.jwt;
|
|
67
|
+
}
|
|
68
|
+
throw msalCommon.createClientAuthError(msalCommon.ClientAuthErrorCodes.invalidAssertion);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
72
|
+
*/
|
|
73
|
+
createJwt(cryptoProvider, issuer, jwtAudience) {
|
|
74
|
+
this.issuer = issuer;
|
|
75
|
+
this.jwtAudience = jwtAudience;
|
|
76
|
+
const issuedAt = msalCommon.TimeUtils.nowSeconds();
|
|
77
|
+
this.expirationTime = issuedAt + 600;
|
|
78
|
+
const header = {
|
|
79
|
+
alg: Constants.JwtConstants.RSA_256,
|
|
80
|
+
x5t: EncodingUtils.EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
|
|
81
|
+
};
|
|
82
|
+
if (this.publicCertificate) {
|
|
83
|
+
Object.assign(header, {
|
|
84
|
+
x5c: this.publicCertificate,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const payload = {
|
|
88
|
+
[Constants.JwtConstants.AUDIENCE]: this.jwtAudience,
|
|
89
|
+
[Constants.JwtConstants.EXPIRATION_TIME]: this.expirationTime,
|
|
90
|
+
[Constants.JwtConstants.ISSUER]: this.issuer,
|
|
91
|
+
[Constants.JwtConstants.SUBJECT]: this.issuer,
|
|
92
|
+
[Constants.JwtConstants.NOT_BEFORE]: issuedAt,
|
|
93
|
+
[Constants.JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
|
|
94
|
+
};
|
|
95
|
+
this.jwt = jwt.sign(payload, this.privateKey, { header });
|
|
96
|
+
return this.jwt;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Utility API to check expiration
|
|
100
|
+
*/
|
|
101
|
+
isExpired() {
|
|
102
|
+
return this.expirationTime < msalCommon.TimeUtils.nowSeconds();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
106
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
107
|
+
*/
|
|
108
|
+
static parseCertificate(publicCertificate) {
|
|
109
|
+
/**
|
|
110
|
+
* This is regex to identify the certs in a given certificate string.
|
|
111
|
+
* We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
|
|
112
|
+
* The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
|
|
113
|
+
* "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
|
|
114
|
+
* The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
|
|
115
|
+
*/
|
|
116
|
+
const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
|
|
117
|
+
const certs = [];
|
|
118
|
+
let matches;
|
|
119
|
+
while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
|
|
120
|
+
// matches[1] represents the first parens capture group in the regex.
|
|
121
|
+
certs.push(matches[1].replace(/\r*\n/g, msalCommon.Constants.EMPTY_STRING));
|
|
122
|
+
}
|
|
123
|
+
return certs;
|
|
124
|
+
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
exports.ClientAssertion = ClientAssertion;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { CryptoProvider } from "../crypto/CryptoProvider.js";
|
|
2
|
-
/**
|
|
3
|
-
* Client assertion of type jwt-bearer used in confidential client flows
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export declare class ClientAssertion {
|
|
7
|
-
private jwt;
|
|
8
|
-
private privateKey;
|
|
9
|
-
private thumbprint;
|
|
10
|
-
private expirationTime;
|
|
11
|
-
private issuer;
|
|
12
|
-
private jwtAudience;
|
|
13
|
-
private publicCertificate;
|
|
14
|
-
/**
|
|
15
|
-
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
16
|
-
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
17
|
-
*/
|
|
18
|
-
static fromAssertion(assertion: string): ClientAssertion;
|
|
19
|
-
/**
|
|
20
|
-
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
21
|
-
* @param thumbprint - identifier of a certificate
|
|
22
|
-
* @param privateKey - secret key
|
|
23
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
24
|
-
*/
|
|
25
|
-
static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
|
|
26
|
-
/**
|
|
27
|
-
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
28
|
-
* @param cryptoProvider - library's crypto helper
|
|
29
|
-
* @param issuer - iss claim
|
|
30
|
-
* @param jwtAudience - aud claim
|
|
31
|
-
*/
|
|
32
|
-
getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string;
|
|
33
|
-
/**
|
|
34
|
-
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
35
|
-
*/
|
|
36
|
-
private createJwt;
|
|
37
|
-
/**
|
|
38
|
-
* Utility API to check expiration
|
|
39
|
-
*/
|
|
40
|
-
private isExpired;
|
|
41
|
-
/**
|
|
42
|
-
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
43
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
44
|
-
*/
|
|
45
|
-
static parseCertificate(publicCertificate: string): Array<string>;
|
|
46
|
-
}
|
|
1
|
+
import { CryptoProvider } from "../crypto/CryptoProvider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Client assertion of type jwt-bearer used in confidential client flows
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class ClientAssertion {
|
|
7
|
+
private jwt;
|
|
8
|
+
private privateKey;
|
|
9
|
+
private thumbprint;
|
|
10
|
+
private expirationTime;
|
|
11
|
+
private issuer;
|
|
12
|
+
private jwtAudience;
|
|
13
|
+
private publicCertificate;
|
|
14
|
+
/**
|
|
15
|
+
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
16
|
+
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
17
|
+
*/
|
|
18
|
+
static fromAssertion(assertion: string): ClientAssertion;
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
21
|
+
* @param thumbprint - identifier of a certificate
|
|
22
|
+
* @param privateKey - secret key
|
|
23
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
24
|
+
*/
|
|
25
|
+
static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion;
|
|
26
|
+
/**
|
|
27
|
+
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
28
|
+
* @param cryptoProvider - library's crypto helper
|
|
29
|
+
* @param issuer - iss claim
|
|
30
|
+
* @param jwtAudience - aud claim
|
|
31
|
+
*/
|
|
32
|
+
getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
35
|
+
*/
|
|
36
|
+
private createJwt;
|
|
37
|
+
/**
|
|
38
|
+
* Utility API to check expiration
|
|
39
|
+
*/
|
|
40
|
+
private isExpired;
|
|
41
|
+
/**
|
|
42
|
+
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
43
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
44
|
+
*/
|
|
45
|
+
static parseCertificate(publicCertificate: string): Array<string>;
|
|
46
|
+
}
|
|
47
47
|
//# sourceMappingURL=ClientAssertion.d.ts.map
|
|
@@ -1,125 +1,125 @@
|
|
|
1
|
-
/*! @azure/msal-node v2.7.
|
|
1
|
+
/*! @azure/msal-node v2.7.1-alpha.0 2024-05-01 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import jwt from 'jsonwebtoken';
|
|
4
4
|
import { createClientAuthError, ClientAuthErrorCodes, TimeUtils, Constants } from '@azure/msal-common';
|
|
5
5
|
import { EncodingUtils } from '../utils/EncodingUtils.mjs';
|
|
6
6
|
import { JwtConstants } from '../utils/Constants.mjs';
|
|
7
7
|
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
* Licensed under the MIT License.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Client assertion of type jwt-bearer used in confidential client flows
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
class ClientAssertion {
|
|
17
|
-
/**
|
|
18
|
-
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
19
|
-
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
20
|
-
*/
|
|
21
|
-
static fromAssertion(assertion) {
|
|
22
|
-
const clientAssertion = new ClientAssertion();
|
|
23
|
-
clientAssertion.jwt = assertion;
|
|
24
|
-
return clientAssertion;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
28
|
-
* @param thumbprint - identifier of a certificate
|
|
29
|
-
* @param privateKey - secret key
|
|
30
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
31
|
-
*/
|
|
32
|
-
static fromCertificate(thumbprint, privateKey, publicCertificate) {
|
|
33
|
-
const clientAssertion = new ClientAssertion();
|
|
34
|
-
clientAssertion.privateKey = privateKey;
|
|
35
|
-
clientAssertion.thumbprint = thumbprint;
|
|
36
|
-
if (publicCertificate) {
|
|
37
|
-
clientAssertion.publicCertificate =
|
|
38
|
-
this.parseCertificate(publicCertificate);
|
|
39
|
-
}
|
|
40
|
-
return clientAssertion;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
44
|
-
* @param cryptoProvider - library's crypto helper
|
|
45
|
-
* @param issuer - iss claim
|
|
46
|
-
* @param jwtAudience - aud claim
|
|
47
|
-
*/
|
|
48
|
-
getJwt(cryptoProvider, issuer, jwtAudience) {
|
|
49
|
-
// if assertion was created from certificate, check if jwt is expired and create new one.
|
|
50
|
-
if (this.privateKey && this.thumbprint) {
|
|
51
|
-
if (this.jwt &&
|
|
52
|
-
!this.isExpired() &&
|
|
53
|
-
issuer === this.issuer &&
|
|
54
|
-
jwtAudience === this.jwtAudience) {
|
|
55
|
-
return this.jwt;
|
|
56
|
-
}
|
|
57
|
-
return this.createJwt(cryptoProvider, issuer, jwtAudience);
|
|
58
|
-
}
|
|
59
|
-
/*
|
|
60
|
-
* if assertion was created by caller, then we just append it. It is up to the caller to
|
|
61
|
-
* ensure that it contains necessary claims and that it is not expired.
|
|
62
|
-
*/
|
|
63
|
-
if (this.jwt) {
|
|
64
|
-
return this.jwt;
|
|
65
|
-
}
|
|
66
|
-
throw createClientAuthError(ClientAuthErrorCodes.invalidAssertion);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
70
|
-
*/
|
|
71
|
-
createJwt(cryptoProvider, issuer, jwtAudience) {
|
|
72
|
-
this.issuer = issuer;
|
|
73
|
-
this.jwtAudience = jwtAudience;
|
|
74
|
-
const issuedAt = TimeUtils.nowSeconds();
|
|
75
|
-
this.expirationTime = issuedAt + 600;
|
|
76
|
-
const header = {
|
|
77
|
-
alg: JwtConstants.RSA_256,
|
|
78
|
-
x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
|
|
79
|
-
};
|
|
80
|
-
if (this.publicCertificate) {
|
|
81
|
-
Object.assign(header, {
|
|
82
|
-
x5c: this.publicCertificate,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const payload = {
|
|
86
|
-
[JwtConstants.AUDIENCE]: this.jwtAudience,
|
|
87
|
-
[JwtConstants.EXPIRATION_TIME]: this.expirationTime,
|
|
88
|
-
[JwtConstants.ISSUER]: this.issuer,
|
|
89
|
-
[JwtConstants.SUBJECT]: this.issuer,
|
|
90
|
-
[JwtConstants.NOT_BEFORE]: issuedAt,
|
|
91
|
-
[JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
|
|
92
|
-
};
|
|
93
|
-
this.jwt = jwt.sign(payload, this.privateKey, { header });
|
|
94
|
-
return this.jwt;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Utility API to check expiration
|
|
98
|
-
*/
|
|
99
|
-
isExpired() {
|
|
100
|
-
return this.expirationTime < TimeUtils.nowSeconds();
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
104
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
105
|
-
*/
|
|
106
|
-
static parseCertificate(publicCertificate) {
|
|
107
|
-
/**
|
|
108
|
-
* This is regex to identify the certs in a given certificate string.
|
|
109
|
-
* We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
|
|
110
|
-
* The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
|
|
111
|
-
* "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
|
|
112
|
-
* The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
|
|
113
|
-
*/
|
|
114
|
-
const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
|
|
115
|
-
const certs = [];
|
|
116
|
-
let matches;
|
|
117
|
-
while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
|
|
118
|
-
// matches[1] represents the first parens capture group in the regex.
|
|
119
|
-
certs.push(matches[1].replace(/\r*\n/g, Constants.EMPTY_STRING));
|
|
120
|
-
}
|
|
121
|
-
return certs;
|
|
122
|
-
}
|
|
8
|
+
/*
|
|
9
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
+
* Licensed under the MIT License.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Client assertion of type jwt-bearer used in confidential client flows
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
class ClientAssertion {
|
|
17
|
+
/**
|
|
18
|
+
* Initialize the ClientAssertion class from the clientAssertion passed by the user
|
|
19
|
+
* @param assertion - refer https://tools.ietf.org/html/rfc7521
|
|
20
|
+
*/
|
|
21
|
+
static fromAssertion(assertion) {
|
|
22
|
+
const clientAssertion = new ClientAssertion();
|
|
23
|
+
clientAssertion.jwt = assertion;
|
|
24
|
+
return clientAssertion;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
28
|
+
* @param thumbprint - identifier of a certificate
|
|
29
|
+
* @param privateKey - secret key
|
|
30
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
31
|
+
*/
|
|
32
|
+
static fromCertificate(thumbprint, privateKey, publicCertificate) {
|
|
33
|
+
const clientAssertion = new ClientAssertion();
|
|
34
|
+
clientAssertion.privateKey = privateKey;
|
|
35
|
+
clientAssertion.thumbprint = thumbprint;
|
|
36
|
+
if (publicCertificate) {
|
|
37
|
+
clientAssertion.publicCertificate =
|
|
38
|
+
this.parseCertificate(publicCertificate);
|
|
39
|
+
}
|
|
40
|
+
return clientAssertion;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
44
|
+
* @param cryptoProvider - library's crypto helper
|
|
45
|
+
* @param issuer - iss claim
|
|
46
|
+
* @param jwtAudience - aud claim
|
|
47
|
+
*/
|
|
48
|
+
getJwt(cryptoProvider, issuer, jwtAudience) {
|
|
49
|
+
// if assertion was created from certificate, check if jwt is expired and create new one.
|
|
50
|
+
if (this.privateKey && this.thumbprint) {
|
|
51
|
+
if (this.jwt &&
|
|
52
|
+
!this.isExpired() &&
|
|
53
|
+
issuer === this.issuer &&
|
|
54
|
+
jwtAudience === this.jwtAudience) {
|
|
55
|
+
return this.jwt;
|
|
56
|
+
}
|
|
57
|
+
return this.createJwt(cryptoProvider, issuer, jwtAudience);
|
|
58
|
+
}
|
|
59
|
+
/*
|
|
60
|
+
* if assertion was created by caller, then we just append it. It is up to the caller to
|
|
61
|
+
* ensure that it contains necessary claims and that it is not expired.
|
|
62
|
+
*/
|
|
63
|
+
if (this.jwt) {
|
|
64
|
+
return this.jwt;
|
|
65
|
+
}
|
|
66
|
+
throw createClientAuthError(ClientAuthErrorCodes.invalidAssertion);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* JWT format and required claims specified: https://tools.ietf.org/html/rfc7523#section-3
|
|
70
|
+
*/
|
|
71
|
+
createJwt(cryptoProvider, issuer, jwtAudience) {
|
|
72
|
+
this.issuer = issuer;
|
|
73
|
+
this.jwtAudience = jwtAudience;
|
|
74
|
+
const issuedAt = TimeUtils.nowSeconds();
|
|
75
|
+
this.expirationTime = issuedAt + 600;
|
|
76
|
+
const header = {
|
|
77
|
+
alg: JwtConstants.RSA_256,
|
|
78
|
+
x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex"),
|
|
79
|
+
};
|
|
80
|
+
if (this.publicCertificate) {
|
|
81
|
+
Object.assign(header, {
|
|
82
|
+
x5c: this.publicCertificate,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
const payload = {
|
|
86
|
+
[JwtConstants.AUDIENCE]: this.jwtAudience,
|
|
87
|
+
[JwtConstants.EXPIRATION_TIME]: this.expirationTime,
|
|
88
|
+
[JwtConstants.ISSUER]: this.issuer,
|
|
89
|
+
[JwtConstants.SUBJECT]: this.issuer,
|
|
90
|
+
[JwtConstants.NOT_BEFORE]: issuedAt,
|
|
91
|
+
[JwtConstants.JWT_ID]: cryptoProvider.createNewGuid(),
|
|
92
|
+
};
|
|
93
|
+
this.jwt = jwt.sign(payload, this.privateKey, { header });
|
|
94
|
+
return this.jwt;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Utility API to check expiration
|
|
98
|
+
*/
|
|
99
|
+
isExpired() {
|
|
100
|
+
return this.expirationTime < TimeUtils.nowSeconds();
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Extracts the raw certs from a given certificate string and returns them in an array.
|
|
104
|
+
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
105
|
+
*/
|
|
106
|
+
static parseCertificate(publicCertificate) {
|
|
107
|
+
/**
|
|
108
|
+
* This is regex to identify the certs in a given certificate string.
|
|
109
|
+
* We want to look for the contents between the BEGIN and END certificate strings, without the associated newlines.
|
|
110
|
+
* The information in parens "(.+?)" is the capture group to represent the cert we want isolated.
|
|
111
|
+
* "." means any string character, "+" means match 1 or more times, and "?" means the shortest match.
|
|
112
|
+
* The "g" at the end of the regex means search the string globally, and the "s" enables the "." to match newlines.
|
|
113
|
+
*/
|
|
114
|
+
const regexToFindCerts = /-----BEGIN CERTIFICATE-----\r*\n(.+?)\r*\n-----END CERTIFICATE-----/gs;
|
|
115
|
+
const certs = [];
|
|
116
|
+
let matches;
|
|
117
|
+
while ((matches = regexToFindCerts.exec(publicCertificate)) !== null) {
|
|
118
|
+
// matches[1] represents the first parens capture group in the regex.
|
|
119
|
+
certs.push(matches[1].replace(/\r*\n/g, Constants.EMPTY_STRING));
|
|
120
|
+
}
|
|
121
|
+
return certs;
|
|
122
|
+
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export { ClientAssertion };
|