@azure/msal-node 1.0.0-beta.5 → 1.0.0-beta.6
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/CHANGELOG.json +33 -0
- package/changelog.md +12 -1
- package/dist/cache/ITokenCache.d.ts +9 -0
- package/dist/cache/ITokenCache.d.ts.map +1 -0
- package/dist/cache/{Storage.d.ts → NodeStorage.d.ts} +42 -33
- package/dist/cache/NodeStorage.d.ts.map +1 -0
- package/dist/cache/TokenCache.d.ts +26 -12
- package/dist/cache/TokenCache.d.ts.map +1 -0
- package/dist/cache/serializer/Deserializer.d.ts +1 -0
- package/dist/cache/serializer/Deserializer.d.ts.map +1 -0
- package/dist/cache/serializer/Serializer.d.ts +1 -0
- package/dist/cache/serializer/Serializer.d.ts.map +1 -0
- package/dist/cache/serializer/SerializerTypes.d.ts +33 -0
- package/dist/cache/serializer/SerializerTypes.d.ts.map +1 -0
- package/dist/client/ClientApplication.d.ts +36 -5
- package/dist/client/ClientApplication.d.ts.map +1 -0
- package/dist/client/ClientAssertion.d.ts +25 -1
- package/dist/client/ClientAssertion.d.ts.map +1 -0
- package/dist/client/ConfidentialClientApplication.d.ts +9 -4
- package/dist/client/ConfidentialClientApplication.d.ts.map +1 -0
- package/dist/client/IConfidentialClientApplication.d.ts +14 -0
- package/dist/client/IConfidentialClientApplication.d.ts.map +1 -0
- package/dist/client/IPublicClientApplication.d.ts +14 -0
- package/dist/client/IPublicClientApplication.d.ts.map +1 -0
- package/dist/client/PublicClientApplication.d.ts +6 -4
- package/dist/client/PublicClientApplication.d.ts.map +1 -0
- package/dist/config/Configuration.d.ts +9 -3
- package/dist/config/Configuration.d.ts.map +1 -0
- package/dist/crypto/CryptoProvider.d.ts +10 -2
- package/dist/crypto/CryptoProvider.d.ts.map +1 -0
- package/dist/crypto/GuidGenerator.d.ts +1 -0
- package/dist/crypto/GuidGenerator.d.ts.map +1 -0
- package/dist/crypto/PkceGenerator.d.ts +1 -0
- package/dist/crypto/PkceGenerator.d.ts.map +1 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/msal-node.cjs.development.js +186 -96
- package/dist/msal-node.cjs.development.js.map +1 -1
- package/dist/msal-node.cjs.production.min.js +1 -1
- package/dist/msal-node.cjs.production.min.js.map +1 -1
- package/dist/msal-node.esm.js +185 -95
- package/dist/msal-node.esm.js.map +1 -1
- package/dist/network/HttpClient.d.ts +1 -1
- package/dist/network/HttpClient.d.ts.map +1 -0
- package/dist/packageMetadata.d.ts +3 -0
- package/dist/packageMetadata.d.ts.map +1 -0
- package/dist/request/AuthorizationCodeRequest.d.ts +3 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -0
- package/dist/request/AuthorizationUrlRequest.d.ts +3 -1
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -0
- package/dist/request/ClientCredentialRequest.d.ts +3 -1
- package/dist/request/ClientCredentialRequest.d.ts.map +1 -0
- package/dist/request/DeviceCodeRequest.d.ts +3 -1
- package/dist/request/DeviceCodeRequest.d.ts.map +1 -0
- package/dist/request/OnBehalfOfRequest.d.ts +3 -1
- package/dist/request/OnBehalfOfRequest.d.ts.map +1 -0
- package/dist/request/RefreshTokenRequest.d.ts +3 -1
- package/dist/request/RefreshTokenRequest.d.ts.map +1 -0
- package/dist/request/SilentFlowRequest.d.ts +3 -1
- package/dist/request/SilentFlowRequest.d.ts.map +1 -0
- package/dist/request/UsernamePasswordRequest.d.ts +3 -1
- package/dist/request/UsernamePasswordRequest.d.ts.map +1 -0
- package/dist/utils/Constants.d.ts +1 -0
- package/dist/utils/Constants.d.ts.map +1 -0
- package/dist/utils/EncodingUtils.d.ts +1 -0
- package/dist/utils/EncodingUtils.d.ts.map +1 -0
- package/dist/utils/NetworkUtils.d.ts +1 -0
- package/dist/utils/NetworkUtils.d.ts.map +1 -0
- package/package.json +4 -3
|
@@ -4,9 +4,13 @@ import { AuthenticationResult } from "@azure/msal-common";
|
|
|
4
4
|
import { IConfidentialClientApplication } from "./IConfidentialClientApplication";
|
|
5
5
|
import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest";
|
|
6
6
|
import { ClientCredentialRequest } from "../request/ClientCredentialRequest";
|
|
7
|
+
/**
|
|
8
|
+
* This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications
|
|
9
|
+
* will configure application secrets, client certificates/assertions as applicable
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
7
12
|
export declare class ConfidentialClientApplication extends ClientApplication implements IConfidentialClientApplication {
|
|
8
13
|
/**
|
|
9
|
-
* @constructor
|
|
10
14
|
* Constructor for the ConfidentialClientApplication
|
|
11
15
|
*
|
|
12
16
|
* Required attributes in the Configuration object are:
|
|
@@ -14,16 +18,16 @@ export declare class ConfidentialClientApplication extends ClientApplication imp
|
|
|
14
18
|
* - authority: the authority URL for your application.
|
|
15
19
|
* - client credential: Must set either client secret, certificate, or assertion for confidential clients. You can obtain a client secret from the application registration portal.
|
|
16
20
|
*
|
|
17
|
-
* In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com
|
|
21
|
+
* In Azure AD, authority is a URL indicating of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
|
|
18
22
|
* 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).
|
|
19
23
|
* If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
|
|
20
24
|
* If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
|
|
21
25
|
* To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
|
|
22
26
|
*
|
|
23
|
-
* In Azure B2C, authority is of the form https
|
|
27
|
+
* In Azure B2C, authority is of the form https://\{instance\}/tfp/\{tenant\}/\{policyName\}/
|
|
24
28
|
* Full B2C functionality will be available in this library in future versions.
|
|
25
29
|
*
|
|
26
|
-
* @param
|
|
30
|
+
* @param Configuration - configuration object for the MSAL ConfidentialClientApplication instance
|
|
27
31
|
*/
|
|
28
32
|
constructor(configuration: Configuration);
|
|
29
33
|
/**
|
|
@@ -44,3 +48,4 @@ export declare class ConfidentialClientApplication extends ClientApplication imp
|
|
|
44
48
|
acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>;
|
|
45
49
|
private setClientCredential;
|
|
46
50
|
}
|
|
51
|
+
//# sourceMappingURL=ConfidentialClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../src/client/ConfidentialClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,OAAO,EAKH,oBAAoB,EAEH,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,6BAA8B,SAAQ,iBAAkB,YAAW,8BAA8B;IAE1G;;;;;;;;;;;;;;;;;;OAkBG;gBACS,aAAa,EAAE,aAAa;IAKxC;;OAEG;IACU,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAqBnH;;;;;;;;;;OAUG;IACU,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAcrG,OAAO,CAAC,mBAAmB;CA+B9B"}
|
|
@@ -6,14 +6,28 @@ import { OnBehalfOfRequest } from "../request/OnBehalfOfRequest";
|
|
|
6
6
|
import { RefreshTokenRequest } from "../request/RefreshTokenRequest";
|
|
7
7
|
import { SilentFlowRequest } from "../request/SilentFlowRequest";
|
|
8
8
|
import { TokenCache } from "../cache/TokenCache";
|
|
9
|
+
/**
|
|
10
|
+
* Interface for the ConfidentialClientApplication class defining the public API signatures
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
9
13
|
export interface IConfidentialClientApplication {
|
|
14
|
+
/** Creates the URL of the authorization request */
|
|
10
15
|
getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
|
|
16
|
+
/** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */
|
|
11
17
|
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult | null>;
|
|
18
|
+
/** Acquires a token silently when a user specifies the account the token is requested for */
|
|
12
19
|
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult | null>;
|
|
20
|
+
/** Acquires a token by exchanging the refresh token provided for a new set of tokens */
|
|
13
21
|
acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
|
|
22
|
+
/** Acquires tokens from the authority for the application (not for an end user) */
|
|
14
23
|
acquireTokenByClientCredential(request: ClientCredentialRequest): Promise<AuthenticationResult | null>;
|
|
24
|
+
/** Acquires tokens from the authority for the application */
|
|
15
25
|
acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise<AuthenticationResult | null>;
|
|
26
|
+
/** Gets the token cache for the application */
|
|
16
27
|
getTokenCache(): TokenCache;
|
|
28
|
+
/** Returns the logger instance */
|
|
17
29
|
getLogger(): Logger;
|
|
30
|
+
/** Replaces the default logger set in configurations with new Logger with new configurations */
|
|
18
31
|
setLogger(logger: Logger): void;
|
|
19
32
|
}
|
|
33
|
+
//# sourceMappingURL=IConfidentialClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConfidentialClientApplication.d.ts","sourceRoot":"","sources":["../src/client/IConfidentialClientApplication.ts"],"names":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S,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC"}
|
|
@@ -6,14 +6,28 @@ import { RefreshTokenRequest } from "../request/RefreshTokenRequest";
|
|
|
6
6
|
import { SilentFlowRequest } from "../request/SilentFlowRequest";
|
|
7
7
|
import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest";
|
|
8
8
|
import { TokenCache } from "../cache/TokenCache";
|
|
9
|
+
/**
|
|
10
|
+
* Interface for the PublicClientApplication class defining the public API signatures
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
9
13
|
export interface IPublicClientApplication {
|
|
14
|
+
/** Creates the URL of the authorization request */
|
|
10
15
|
getAuthCodeUrl(request: AuthorizationUrlRequest): Promise<string>;
|
|
16
|
+
/** Acquires a token by exchanging the authorization code received from the first step of OAuth 2.0 Authorization Code Flow */
|
|
11
17
|
acquireTokenByCode(request: AuthorizationCodeRequest): Promise<AuthenticationResult | null>;
|
|
18
|
+
/** Acquires a token silently when a user specifies the account the token is requested for */
|
|
12
19
|
acquireTokenSilent(request: SilentFlowRequest): Promise<AuthenticationResult | null>;
|
|
20
|
+
/** Acquires a token by exchanging the refresh token provided for a new set of tokens */
|
|
13
21
|
acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise<AuthenticationResult | null>;
|
|
22
|
+
/** Acquires a token from the authority using OAuth2.0 device code flow */
|
|
14
23
|
acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise<AuthenticationResult | null>;
|
|
24
|
+
/** Acquires tokens with password grant by exchanging client applications username and password for credentials */
|
|
15
25
|
acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
|
|
26
|
+
/** Gets the token cache for the application */
|
|
16
27
|
getTokenCache(): TokenCache;
|
|
28
|
+
/** Returns the logger instance */
|
|
17
29
|
getLogger(): Logger;
|
|
30
|
+
/** Replaces the default logger set in configurations with new Logger with new configurations */
|
|
18
31
|
setLogger(logger: Logger): void;
|
|
19
32
|
}
|
|
33
|
+
//# sourceMappingURL=IPublicClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../src/client/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IAErC,mDAAmD;IACnD,cAAc,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,8HAA8H;IAC9H,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAE5F,6FAA6F;IAC7F,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAErF,wFAAwF;IACxF,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAE/F,0EAA0E;IAC1E,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAE3F,kHAAkH;IAClH,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAEvG,+CAA+C;IAC/C,aAAa,IAAI,UAAU,CAAC;IAE5B,kCAAkC;IAClC,SAAS,IAAI,MAAM,CAAC;IAEpB,gGAAgG;IAChG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC"}
|
|
@@ -7,6 +7,7 @@ import { UsernamePasswordRequest } from "../request/UsernamePasswordRequest";
|
|
|
7
7
|
/**
|
|
8
8
|
* This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications
|
|
9
9
|
* are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user.
|
|
10
|
+
* @public
|
|
10
11
|
*/
|
|
11
12
|
export declare class PublicClientApplication extends ClientApplication implements IPublicClientApplication {
|
|
12
13
|
/**
|
|
@@ -14,17 +15,17 @@ export declare class PublicClientApplication extends ClientApplication implement
|
|
|
14
15
|
* - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal.
|
|
15
16
|
* - authority: the authority URL for your application.
|
|
16
17
|
*
|
|
17
|
-
* AAD authorities are of the form https://login.microsoftonline.com
|
|
18
|
+
* AAD authorities are of the form https://login.microsoftonline.com/\{Enter_the_Tenant_Info_Here\}.
|
|
18
19
|
* - 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).
|
|
19
20
|
* - If your application supports Accounts in any organizational directory, replace "Enter_the_Tenant_Info_Here" value with organizations.
|
|
20
21
|
* - If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace "Enter_the_Tenant_Info_Here" value with common.
|
|
21
22
|
* - To restrict support to Personal Microsoft accounts only, replace "Enter_the_Tenant_Info_Here" value with consumers.
|
|
22
23
|
*
|
|
23
|
-
* Azure B2C authorities are of the form https
|
|
24
|
+
* Azure B2C authorities are of the form https://\{instance\}/\{tenant\}/\{policy\}. Each policy is considered
|
|
24
25
|
* its own authority. You will have to set the all of the knownAuthorities at the time of the client application
|
|
25
26
|
* construction.
|
|
26
27
|
*
|
|
27
|
-
* ADFS authorities are of the form https
|
|
28
|
+
* ADFS authorities are of the form https://\{instance\}/adfs.
|
|
28
29
|
*/
|
|
29
30
|
constructor(configuration: Configuration);
|
|
30
31
|
/**
|
|
@@ -45,7 +46,8 @@ export declare class PublicClientApplication extends ClientApplication implement
|
|
|
45
46
|
* Microsoft's documentation and recommendations are at:
|
|
46
47
|
* https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#usernamepassword
|
|
47
48
|
*
|
|
48
|
-
* @param request
|
|
49
|
+
* @param request - UsenamePasswordRequest
|
|
49
50
|
*/
|
|
50
51
|
acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise<AuthenticationResult | null>;
|
|
51
52
|
}
|
|
53
|
+
//# sourceMappingURL=PublicClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../src/client/PublicClientApplication.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,oBAAoB,EAIvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,wBAAwB;IAC9F;;;;;;;;;;;;;;;;OAgBG;gBACS,aAAa,EAAE,aAAa;IAIxC;;;;;;;;OAQG;IACU,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAqBvG;;;;;;;;;OASG;IACG,8BAA8B,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;CAoB/G"}
|
|
@@ -7,6 +7,7 @@ import { LoggerOptions, INetworkModule, ProtocolMode, ICachePlugin } from "@azur
|
|
|
7
7
|
* - clientAssertion - Assertion string that the application uses when requesting a token. Only used in confidential client applications. Assertion should be of type urn:ietf:params:oauth:client-assertion-type:jwt-bearer.
|
|
8
8
|
* - clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 thumbprint of the certificiate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
|
|
9
9
|
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
|
|
10
|
+
* @public
|
|
10
11
|
*/
|
|
11
12
|
export declare type NodeAuthOptions = {
|
|
12
13
|
clientId: string;
|
|
@@ -28,6 +29,7 @@ export declare type NodeAuthOptions = {
|
|
|
28
29
|
* Use this to configure the below cache configuration options:
|
|
29
30
|
*
|
|
30
31
|
* - cachePlugin - Plugin for reading and writing token cache to disk.
|
|
32
|
+
* @public
|
|
31
33
|
*/
|
|
32
34
|
export declare type CacheOptions = {
|
|
33
35
|
cachePlugin?: ICachePlugin;
|
|
@@ -37,6 +39,7 @@ export declare type CacheOptions = {
|
|
|
37
39
|
*
|
|
38
40
|
* - logger - Used to initialize the Logger object; TODO: Expand on logger details or link to the documentation on logger
|
|
39
41
|
* - networkClient - Http client used for all http get and post calls. Defaults to using MSAL's default http client.
|
|
42
|
+
* @public
|
|
40
43
|
*/
|
|
41
44
|
export declare type NodeSystemOptions = {
|
|
42
45
|
loggerOptions?: LoggerOptions;
|
|
@@ -48,6 +51,7 @@ export declare type NodeSystemOptions = {
|
|
|
48
51
|
* - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform
|
|
49
52
|
* - cache: this is where you configure cache location
|
|
50
53
|
* - system: this is where you can configure the network client, logger
|
|
54
|
+
* @public
|
|
51
55
|
*/
|
|
52
56
|
export declare type Configuration = {
|
|
53
57
|
auth: NodeAuthOptions;
|
|
@@ -57,10 +61,12 @@ export declare type Configuration = {
|
|
|
57
61
|
/**
|
|
58
62
|
* Sets the default options when not explicitly configured from app developer
|
|
59
63
|
*
|
|
60
|
-
* @param auth
|
|
61
|
-
* @param cache
|
|
62
|
-
* @param system
|
|
64
|
+
* @param auth - Authentication options
|
|
65
|
+
* @param cache - Cache options
|
|
66
|
+
* @param system - System options
|
|
63
67
|
*
|
|
64
68
|
* @returns Configuration
|
|
69
|
+
* @public
|
|
65
70
|
*/
|
|
66
71
|
export declare function buildAppConfiguration({ auth, cache, system, }: Configuration): Configuration;
|
|
72
|
+
//# sourceMappingURL=Configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../src/config/Configuration.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,aAAa,EACb,cAAc,EAEd,YAAY,EACZ,YAAY,EACf,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;GASG;AACH,oBAAY,eAAe,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAC,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,CAAA;KACf,CAAC;IACF,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B,CAAC;AAEF;;;;;GAKG;AACH,oBAAY,YAAY,GAAG;IACvB,WAAW,CAAC,EAAE,YAAY,CAAC;CAC9B,CAAC;AAEF;;;;;;GAMG;AACH,oBAAY,iBAAiB,GAAG;IAC5B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,aAAa,CAAC,EAAE,cAAc,CAAC;CAClC,CAAC;AAEF;;;;;;;GAOG;AACH,oBAAY,aAAa,GAAG;IACxB,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC;AAkCF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,MAAM,GACT,EAAE,aAAa,GAAG,aAAa,CAM/B"}
|
|
@@ -2,6 +2,7 @@ import { ICrypto, PkceCodes } from "@azure/msal-common";
|
|
|
2
2
|
/**
|
|
3
3
|
* This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and
|
|
4
4
|
* implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).
|
|
5
|
+
* @public
|
|
5
6
|
*/
|
|
6
7
|
export declare class CryptoProvider implements ICrypto {
|
|
7
8
|
private pkceGenerator;
|
|
@@ -13,18 +14,25 @@ export declare class CryptoProvider implements ICrypto {
|
|
|
13
14
|
createNewGuid(): string;
|
|
14
15
|
/**
|
|
15
16
|
* Encodes input string to base64.
|
|
16
|
-
* @param input
|
|
17
|
+
* @param input - string to be encoded
|
|
17
18
|
*/
|
|
18
19
|
base64Encode(input: string): string;
|
|
19
20
|
/**
|
|
20
21
|
* Decodes input string from base64.
|
|
21
|
-
* @param input
|
|
22
|
+
* @param input - string to be decoded
|
|
22
23
|
*/
|
|
23
24
|
base64Decode(input: string): string;
|
|
24
25
|
/**
|
|
25
26
|
* Generates PKCE codes used in Authorization Code Flow.
|
|
26
27
|
*/
|
|
27
28
|
generatePkceCodes(): Promise<PkceCodes>;
|
|
29
|
+
/**
|
|
30
|
+
* Generates a keypair, stores it and returns a thumbprint - not yet implemented for node
|
|
31
|
+
*/
|
|
28
32
|
getPublicKeyThumbprint(): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Signs the given object as a jwt payload with private key retrieved by given kid - currently not implemented for node
|
|
35
|
+
*/
|
|
29
36
|
signJwt(): Promise<string>;
|
|
30
37
|
}
|
|
38
|
+
//# sourceMappingURL=CryptoProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoProvider.d.ts","sourceRoot":"","sources":["../src/crypto/CryptoProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAKxD;;;;GAIG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC1C,OAAO,CAAC,aAAa,CAAgB;;IAOrC;;;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;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAIvC;;OAEG;IACH,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzC;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAG7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GuidGenerator.d.ts","sourceRoot":"","sources":["../src/crypto/GuidGenerator.ts"],"names":[],"mappings":"AAOA,qBAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAAC,YAAY,IAAI,MAAM;IAI7B;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM;CAI7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkceGenerator.d.ts","sourceRoot":"","sources":["../src/crypto/PkceGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C;;GAEG;AACH,qBAAa,aAAa;IACtB;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC;IAM7C;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;;OAGG;IACH,OAAO,CAAC,iCAAiC;IAOzC;;;OAGG;IACH,OAAO,CAAC,MAAM;IAOd;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAQ3B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,20 +4,23 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { IPublicClientApplication } from "./client/IPublicClientApplication";
|
|
6
6
|
export { IConfidentialClientApplication } from "./client/IConfidentialClientApplication";
|
|
7
|
+
export { ITokenCache } from "./cache/ITokenCache";
|
|
7
8
|
export { PublicClientApplication } from "./client/PublicClientApplication";
|
|
8
9
|
export { ConfidentialClientApplication } from "./client/ConfidentialClientApplication";
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export { Deserializer } from "./cache/serializer/Deserializer";
|
|
10
|
+
export { ClientApplication } from "./client/ClientApplication";
|
|
11
|
+
export { Configuration, buildAppConfiguration, NodeAuthOptions, NodeSystemOptions, CacheOptions } from "./config/Configuration";
|
|
12
|
+
export { ClientAssertion } from "./client/ClientAssertion";
|
|
13
13
|
export { TokenCache } from "./cache/TokenCache";
|
|
14
|
-
export {
|
|
14
|
+
export { NodeStorage } from "./cache/NodeStorage";
|
|
15
|
+
export { CacheKVStore, JsonCache, InMemoryCache, SerializedAccountEntity, SerializedIdTokenEntity, SerializedAccessTokenEntity, SerializedAppMetadataEntity, SerializedRefreshTokenEntity } from "./cache/serializer/SerializerTypes";
|
|
15
16
|
export { CryptoProvider } from "./crypto/CryptoProvider";
|
|
16
17
|
export type { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest";
|
|
17
18
|
export type { AuthorizationUrlRequest } from "./request/AuthorizationUrlRequest";
|
|
18
19
|
export type { ClientCredentialRequest } from "./request/ClientCredentialRequest";
|
|
19
20
|
export type { DeviceCodeRequest } from "./request/DeviceCodeRequest";
|
|
20
21
|
export type { OnBehalfOfRequest } from "./request/OnBehalfOfRequest";
|
|
22
|
+
export type { UsernamePasswordRequest } from "./request/UsernamePasswordRequest";
|
|
21
23
|
export type { RefreshTokenRequest } from "./request/RefreshTokenRequest";
|
|
22
24
|
export type { SilentFlowRequest } from "./request/SilentFlowRequest";
|
|
23
|
-
export { PromptValue, ResponseMode, AuthenticationResult, AccountInfo, AuthError, AuthErrorMessage, InteractionRequiredAuthError, ServerError, ClientAuthError, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorMessage, INetworkModule, NetworkRequestOptions, NetworkResponse, Logger, LogLevel, ProtocolMode, ICachePlugin, TokenCacheContext, ISerializableTokenCache } from "@azure/msal-common";
|
|
25
|
+
export { PromptValue, ResponseMode, AuthenticationResult, AccountInfo, ValidCacheType, AuthError, AuthErrorMessage, InteractionRequiredAuthError, ServerError, ClientAuthError, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorMessage, INetworkModule, NetworkRequestOptions, NetworkResponse, Logger, LogLevel, ProtocolMode, ICachePlugin, TokenCacheContext, ISerializableTokenCache } from "@azure/msal-common";
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAGH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,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