@azure/identity-cache-persistence 1.1.2-alpha.20241111.1 → 1.1.2-alpha.20241113.2
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/index.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/platforms.js.map +1 -0
- package/dist-esm/src/provider.js.map +1 -0
- package/package.json +3 -4
- package/dist-esm/identity/src/client/identityClient.js +0 -257
- package/dist-esm/identity/src/client/identityClient.js.map +0 -1
- package/dist-esm/identity/src/constants.js +0 -70
- package/dist-esm/identity/src/constants.js.map +0 -1
- package/dist-esm/identity/src/credentials/authorityValidationOptions.js +0 -4
- package/dist-esm/identity/src/credentials/authorityValidationOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/authorizationCodeCredential.js +0 -63
- package/dist-esm/identity/src/credentials/authorizationCodeCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/authorizationCodeCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/authorizationCodeCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/azureCliCredential.js +0 -194
- package/dist-esm/identity/src/credentials/azureCliCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/azureCliCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/azureCliCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/azureDeveloperCliCredential.js +0 -176
- package/dist-esm/identity/src/credentials/azureDeveloperCliCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/azureDeveloperCliCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/azureDeveloperCliCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/azurePipelinesCredential.js +0 -146
- package/dist-esm/identity/src/credentials/azurePipelinesCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/azurePipelinesCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/azurePipelinesCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/azurePowerShellCredential.js +0 -238
- package/dist-esm/identity/src/credentials/azurePowerShellCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/azurePowerShellCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/azurePowerShellCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/brokerAuthOptions.js +0 -2
- package/dist-esm/identity/src/credentials/brokerAuthOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/browserCustomizationOptions.js +0 -4
- package/dist-esm/identity/src/credentials/browserCustomizationOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/chainedTokenCredential.js +0 -95
- package/dist-esm/identity/src/credentials/chainedTokenCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/clientAssertionCredential.js +0 -58
- package/dist-esm/identity/src/credentials/clientAssertionCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/clientAssertionCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/clientAssertionCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/clientCertificateCredential.js +0 -126
- package/dist-esm/identity/src/credentials/clientCertificateCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/clientCertificateCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/clientCertificateCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/clientSecretCredential.js +0 -63
- package/dist-esm/identity/src/credentials/clientSecretCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/clientSecretCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/clientSecretCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/credentialPersistenceOptions.js +0 -4
- package/dist-esm/identity/src/credentials/credentialPersistenceOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/defaultAzureCredential.js +0 -164
- package/dist-esm/identity/src/credentials/defaultAzureCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/defaultAzureCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/defaultAzureCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/deviceCodeCredential.js +0 -96
- package/dist-esm/identity/src/credentials/deviceCodeCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/deviceCodeCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/deviceCodeCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/environmentCredential.js +0 -133
- package/dist-esm/identity/src/credentials/environmentCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/environmentCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/environmentCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/interactiveBrowserCredential.js +0 -96
- package/dist-esm/identity/src/credentials/interactiveBrowserCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/interactiveBrowserCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/interactiveBrowserCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/interactiveCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/interactiveCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/managedIdentityCredential/imdsMsi.js +0 -125
- package/dist-esm/identity/src/credentials/managedIdentityCredential/imdsMsi.js.map +0 -1
- package/dist-esm/identity/src/credentials/managedIdentityCredential/imdsRetryPolicy.js +0 -33
- package/dist-esm/identity/src/credentials/managedIdentityCredential/imdsRetryPolicy.js.map +0 -1
- package/dist-esm/identity/src/credentials/managedIdentityCredential/index.js +0 -220
- package/dist-esm/identity/src/credentials/managedIdentityCredential/index.js.map +0 -1
- package/dist-esm/identity/src/credentials/managedIdentityCredential/models.js +0 -4
- package/dist-esm/identity/src/credentials/managedIdentityCredential/models.js.map +0 -1
- package/dist-esm/identity/src/credentials/managedIdentityCredential/tokenExchangeMsi.js +0 -37
- package/dist-esm/identity/src/credentials/managedIdentityCredential/tokenExchangeMsi.js.map +0 -1
- package/dist-esm/identity/src/credentials/managedIdentityCredential/utils.js +0 -77
- package/dist-esm/identity/src/credentials/managedIdentityCredential/utils.js.map +0 -1
- package/dist-esm/identity/src/credentials/multiTenantTokenCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/multiTenantTokenCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/onBehalfOfCredential.js +0 -119
- package/dist-esm/identity/src/credentials/onBehalfOfCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/onBehalfOfCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/onBehalfOfCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/usernamePasswordCredential.js +0 -70
- package/dist-esm/identity/src/credentials/usernamePasswordCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/usernamePasswordCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/usernamePasswordCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/visualStudioCodeCredential.js +0 -195
- package/dist-esm/identity/src/credentials/visualStudioCodeCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/visualStudioCodeCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/visualStudioCodeCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/credentials/visualStudioCodeCredentialPlugin.js +0 -4
- package/dist-esm/identity/src/credentials/visualStudioCodeCredentialPlugin.js.map +0 -1
- package/dist-esm/identity/src/credentials/workloadIdentityCredential.js +0 -119
- package/dist-esm/identity/src/credentials/workloadIdentityCredential.js.map +0 -1
- package/dist-esm/identity/src/credentials/workloadIdentityCredentialOptions.js +0 -4
- package/dist-esm/identity/src/credentials/workloadIdentityCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/errors.js +0 -123
- package/dist-esm/identity/src/errors.js.map +0 -1
- package/dist-esm/identity/src/index.js +0 -34
- package/dist-esm/identity/src/index.js.map +0 -1
- package/dist-esm/identity/src/msal/msal.js +0 -5
- package/dist-esm/identity/src/msal/msal.js.map +0 -1
- package/dist-esm/identity/src/msal/nodeFlows/brokerOptions.js +0 -2
- package/dist-esm/identity/src/msal/nodeFlows/brokerOptions.js.map +0 -1
- package/dist-esm/identity/src/msal/nodeFlows/msalClient.js +0 -511
- package/dist-esm/identity/src/msal/nodeFlows/msalClient.js.map +0 -1
- package/dist-esm/identity/src/msal/nodeFlows/msalPlugins.js +0 -87
- package/dist-esm/identity/src/msal/nodeFlows/msalPlugins.js.map +0 -1
- package/dist-esm/identity/src/msal/nodeFlows/tokenCachePersistenceOptions.js +0 -4
- package/dist-esm/identity/src/msal/nodeFlows/tokenCachePersistenceOptions.js.map +0 -1
- package/dist-esm/identity/src/msal/types.js +0 -4
- package/dist-esm/identity/src/msal/types.js.map +0 -1
- package/dist-esm/identity/src/msal/utils.js +0 -232
- package/dist-esm/identity/src/msal/utils.js.map +0 -1
- package/dist-esm/identity/src/plugins/consumer.js +0 -43
- package/dist-esm/identity/src/plugins/consumer.js.map +0 -1
- package/dist-esm/identity/src/plugins/provider.js +0 -4
- package/dist-esm/identity/src/plugins/provider.js.map +0 -1
- package/dist-esm/identity/src/regionalAuthority.js +0 -140
- package/dist-esm/identity/src/regionalAuthority.js.map +0 -1
- package/dist-esm/identity/src/tokenCredentialOptions.js +0 -4
- package/dist-esm/identity/src/tokenCredentialOptions.js.map +0 -1
- package/dist-esm/identity/src/tokenProvider.js +0 -55
- package/dist-esm/identity/src/tokenProvider.js.map +0 -1
- package/dist-esm/identity/src/util/identityTokenEndpoint.js +0 -11
- package/dist-esm/identity/src/util/identityTokenEndpoint.js.map +0 -1
- package/dist-esm/identity/src/util/logging.js +0 -94
- package/dist-esm/identity/src/util/logging.js.map +0 -1
- package/dist-esm/identity/src/util/processMultiTenantRequest.js +0 -35
- package/dist-esm/identity/src/util/processMultiTenantRequest.js.map +0 -1
- package/dist-esm/identity/src/util/processUtils.js +0 -32
- package/dist-esm/identity/src/util/processUtils.js.map +0 -1
- package/dist-esm/identity/src/util/scopeUtils.js +0 -29
- package/dist-esm/identity/src/util/scopeUtils.js.map +0 -1
- package/dist-esm/identity/src/util/subscriptionUtils.js +0 -14
- package/dist-esm/identity/src/util/subscriptionUtils.js.map +0 -1
- package/dist-esm/identity/src/util/tenantIdUtils.js +0 -44
- package/dist-esm/identity/src/util/tenantIdUtils.js.map +0 -1
- package/dist-esm/identity/src/util/tracing.js +0 -14
- package/dist-esm/identity/src/util/tracing.js.map +0 -1
- package/dist-esm/identity-cache-persistence/src/index.js.map +0 -1
- package/dist-esm/identity-cache-persistence/src/platforms.js.map +0 -1
- package/dist-esm/identity-cache-persistence/src/provider.js.map +0 -1
- /package/dist-esm/{identity-cache-persistence/src → src}/index.js +0 -0
- /package/dist-esm/{identity-cache-persistence/src → src}/platforms.js +0 -0
- /package/dist-esm/{identity-cache-persistence/src → src}/provider.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../identity/src/errors.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { GetTokenOptions } from \"@azure/core-auth\";\n\n/**\n * See the official documentation for more details:\n *\n * https://learn.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code#error-response-1\n *\n * NOTE: This documentation is for v1 OAuth support but the same error\n * response details still apply to v2.\n */\nexport interface ErrorResponse {\n /**\n * The string identifier for the error.\n */\n error: string;\n\n /**\n * The error's description.\n */\n errorDescription: string;\n\n /**\n * An array of codes pertaining to the error(s) that occurred.\n */\n errorCodes?: number[];\n\n /**\n * The timestamp at which the error occurred.\n */\n timestamp?: string;\n\n /**\n * The trace identifier for this error occurrence.\n */\n traceId?: string;\n\n /**\n * The correlation ID to be used for tracking the source of the error.\n */\n correlationId?: string;\n}\n\n/**\n * Used for internal deserialization of OAuth responses. Public model is ErrorResponse\n * @internal\n */\nexport interface OAuthErrorResponse {\n error: string;\n error_description: string;\n error_codes?: number[];\n timestamp?: string;\n trace_id?: string;\n correlation_id?: string;\n}\n\nfunction isErrorResponse(errorResponse: any): errorResponse is OAuthErrorResponse {\n return (\n errorResponse &&\n typeof errorResponse.error === \"string\" &&\n typeof errorResponse.error_description === \"string\"\n );\n}\n\n/**\n * The Error.name value of an CredentialUnavailable\n */\nexport const CredentialUnavailableErrorName = \"CredentialUnavailableError\";\n\n/**\n * This signifies that the credential that was tried in a chained credential\n * was not available to be used as the credential. Rather than treating this as\n * an error that should halt the chain, it's caught and the chain continues\n */\nexport class CredentialUnavailableError extends Error {\n constructor(message?: string, options?: { cause?: unknown }) {\n // @ts-expect-error - TypeScript does not recognize this until we use ES2022 as the target; however, all our major runtimes do support the `cause` property\n super(message, options);\n this.name = CredentialUnavailableErrorName;\n }\n}\n\n/**\n * The Error.name value of an AuthenticationError\n */\nexport const AuthenticationErrorName = \"AuthenticationError\";\n\n/**\n * Provides details about a failure to authenticate with Azure Active\n * Directory. The `errorResponse` field contains more details about\n * the specific failure.\n */\nexport class AuthenticationError extends Error {\n /**\n * The HTTP status code returned from the authentication request.\n */\n public readonly statusCode: number;\n\n /**\n * The error response details.\n */\n public readonly errorResponse: ErrorResponse;\n\n constructor(\n statusCode: number,\n errorBody: object | string | undefined | null,\n options?: { cause?: unknown },\n ) {\n let errorResponse: ErrorResponse = {\n error: \"unknown\",\n errorDescription: \"An unknown error occurred and no additional details are available.\",\n };\n\n if (isErrorResponse(errorBody)) {\n errorResponse = convertOAuthErrorResponseToErrorResponse(errorBody);\n } else if (typeof errorBody === \"string\") {\n try {\n // Most error responses will contain JSON-formatted error details\n // in the response body\n const oauthErrorResponse: OAuthErrorResponse = JSON.parse(errorBody);\n errorResponse = convertOAuthErrorResponseToErrorResponse(oauthErrorResponse);\n } catch (e: any) {\n if (statusCode === 400) {\n errorResponse = {\n error: \"invalid_request\",\n errorDescription: `The service indicated that the request was invalid.\\n\\n${errorBody}`,\n };\n } else {\n errorResponse = {\n error: \"unknown_error\",\n errorDescription: `An unknown error has occurred. Response body:\\n\\n${errorBody}`,\n };\n }\n }\n } else {\n errorResponse = {\n error: \"unknown_error\",\n errorDescription: \"An unknown error occurred and no additional details are available.\",\n };\n }\n\n super(\n `${errorResponse.error} Status code: ${statusCode}\\nMore details:\\n${errorResponse.errorDescription},`,\n // @ts-expect-error - TypeScript does not recognize this until we use ES2022 as the target; however, all our major runtimes do support the `cause` property\n options,\n );\n this.statusCode = statusCode;\n this.errorResponse = errorResponse;\n\n // Ensure that this type reports the correct name\n this.name = AuthenticationErrorName;\n }\n}\n\n/**\n * The Error.name value of an AggregateAuthenticationError\n */\nexport const AggregateAuthenticationErrorName = \"AggregateAuthenticationError\";\n\n/**\n * Provides an `errors` array containing {@link AuthenticationError} instance\n * for authentication failures from credentials in a {@link ChainedTokenCredential}.\n */\nexport class AggregateAuthenticationError extends Error {\n /**\n * The array of error objects that were thrown while trying to authenticate\n * with the credentials in a {@link ChainedTokenCredential}.\n */\n public errors: any[];\n\n constructor(errors: any[], errorMessage?: string) {\n const errorDetail = errors.join(\"\\n\");\n super(`${errorMessage}\\n${errorDetail}`);\n this.errors = errors;\n\n // Ensure that this type reports the correct name\n this.name = AggregateAuthenticationErrorName;\n }\n}\n\nfunction convertOAuthErrorResponseToErrorResponse(errorBody: OAuthErrorResponse): ErrorResponse {\n return {\n error: errorBody.error,\n errorDescription: errorBody.error_description,\n correlationId: errorBody.correlation_id,\n errorCodes: errorBody.error_codes,\n timestamp: errorBody.timestamp,\n traceId: errorBody.trace_id,\n };\n}\n\n/**\n * Optional parameters to the {@link AuthenticationRequiredError}\n */\nexport interface AuthenticationRequiredErrorOptions {\n /**\n * The list of scopes for which the token will have access.\n */\n scopes: string[];\n /**\n * The options passed to the getToken request.\n */\n getTokenOptions?: GetTokenOptions;\n /**\n * The message of the error.\n */\n message?: string;\n /**\n * The underlying cause, if any, that caused the authentication to fail.\n */\n cause?: unknown;\n}\n\n/**\n * Error used to enforce authentication after trying to retrieve a token silently.\n */\nexport class AuthenticationRequiredError extends Error {\n /**\n * The list of scopes for which the token will have access.\n */\n public scopes: string[];\n /**\n * The options passed to the getToken request.\n */\n public getTokenOptions?: GetTokenOptions;\n\n constructor(\n /**\n * Optional parameters. A message can be specified. The {@link GetTokenOptions} of the request can also be specified to more easily associate the error with the received parameters.\n */\n options: AuthenticationRequiredErrorOptions,\n ) {\n super(\n options.message,\n // @ts-expect-error - TypeScript does not recognize this until we use ES2022 as the target; however, all our major runtimes do support the `cause` property\n options.cause ? { cause: options.cause } : undefined,\n );\n this.scopes = options.scopes;\n this.getTokenOptions = options.getTokenOptions;\n this.name = \"AuthenticationRequiredError\";\n }\n}\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
export * from "./plugins/consumer";
|
|
4
|
-
import { DefaultAzureCredential } from "./credentials/defaultAzureCredential";
|
|
5
|
-
export { AuthenticationError, AggregateAuthenticationError, AuthenticationErrorName, AggregateAuthenticationErrorName, CredentialUnavailableError, CredentialUnavailableErrorName, AuthenticationRequiredError, } from "./errors";
|
|
6
|
-
export { serializeAuthenticationRecord, deserializeAuthenticationRecord } from "./msal/utils";
|
|
7
|
-
export { ChainedTokenCredential } from "./credentials/chainedTokenCredential";
|
|
8
|
-
export { ClientSecretCredential } from "./credentials/clientSecretCredential";
|
|
9
|
-
export { DefaultAzureCredential } from "./credentials/defaultAzureCredential";
|
|
10
|
-
export { EnvironmentCredential } from "./credentials/environmentCredential";
|
|
11
|
-
export { ClientCertificateCredential, } from "./credentials/clientCertificateCredential";
|
|
12
|
-
export { ClientAssertionCredential } from "./credentials/clientAssertionCredential";
|
|
13
|
-
export { AzureCliCredential } from "./credentials/azureCliCredential";
|
|
14
|
-
export { AzureDeveloperCliCredential } from "./credentials/azureDeveloperCliCredential";
|
|
15
|
-
export { InteractiveBrowserCredential } from "./credentials/interactiveBrowserCredential";
|
|
16
|
-
export { ManagedIdentityCredential, } from "./credentials/managedIdentityCredential";
|
|
17
|
-
export { DeviceCodeCredential } from "./credentials/deviceCodeCredential";
|
|
18
|
-
export { AzurePipelinesCredential as AzurePipelinesCredential } from "./credentials/azurePipelinesCredential";
|
|
19
|
-
export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential";
|
|
20
|
-
export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential";
|
|
21
|
-
export { UsernamePasswordCredential } from "./credentials/usernamePasswordCredential";
|
|
22
|
-
export { VisualStudioCodeCredential } from "./credentials/visualStudioCodeCredential";
|
|
23
|
-
export { OnBehalfOfCredential } from "./credentials/onBehalfOfCredential";
|
|
24
|
-
export { WorkloadIdentityCredential } from "./credentials/workloadIdentityCredential";
|
|
25
|
-
export { logger } from "./util/logging";
|
|
26
|
-
export { AzureAuthorityHosts } from "./constants";
|
|
27
|
-
/**
|
|
28
|
-
* Returns a new instance of the {@link DefaultAzureCredential}.
|
|
29
|
-
*/
|
|
30
|
-
export function getDefaultAzureCredential() {
|
|
31
|
-
return new DefaultAzureCredential();
|
|
32
|
-
}
|
|
33
|
-
export { getBearerTokenProvider } from "./tokenProvider";
|
|
34
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../identity/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC;AAKnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,GAE5B,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,cAAc,CAAC;AAe9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAO9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E,OAAO,EACL,2BAA2B,GAI5B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAGpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAM1F,OAAO,EACL,yBAAyB,GAI1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAM1E,OAAO,EAAE,wBAAwB,IAAI,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAExF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAQpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAMtF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,IAAI,sBAAsB,EAAE,CAAC;AACtC,CAAC;AAED,OAAO,EAAE,sBAAsB,EAAiC,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./plugins/consumer\";\n\nexport { IdentityPlugin } from \"./plugins/provider\";\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { DefaultAzureCredential } from \"./credentials/defaultAzureCredential\";\n\nexport {\n AuthenticationError,\n ErrorResponse,\n AggregateAuthenticationError,\n AuthenticationErrorName,\n AggregateAuthenticationErrorName,\n CredentialUnavailableError,\n CredentialUnavailableErrorName,\n AuthenticationRequiredError,\n AuthenticationRequiredErrorOptions,\n} from \"./errors\";\n\nexport { AuthenticationRecord } from \"./msal/types\";\nexport { serializeAuthenticationRecord, deserializeAuthenticationRecord } from \"./msal/utils\";\nexport { TokenCredentialOptions } from \"./tokenCredentialOptions\";\nexport { MultiTenantTokenCredentialOptions } from \"./credentials/multiTenantTokenCredentialOptions\";\nexport { AuthorityValidationOptions } from \"./credentials/authorityValidationOptions\";\n// TODO: Export again once we're ready to release this feature.\n// export { RegionalAuthority } from \"./regionalAuthority\";\n\nexport { BrokerAuthOptions } from \"./credentials/brokerAuthOptions\";\nexport {\n BrokerOptions,\n BrokerEnabledOptions,\n BrokerDisabledOptions,\n} from \"./msal/nodeFlows/brokerOptions\";\nexport { InteractiveCredentialOptions } from \"./credentials/interactiveCredentialOptions\";\n\nexport { ChainedTokenCredential } from \"./credentials/chainedTokenCredential\";\n\nexport { ClientSecretCredential } from \"./credentials/clientSecretCredential\";\nexport { ClientSecretCredentialOptions } from \"./credentials/clientSecretCredentialOptions\";\n\nexport { DefaultAzureCredential } from \"./credentials/defaultAzureCredential\";\nexport {\n DefaultAzureCredentialOptions,\n DefaultAzureCredentialClientIdOptions,\n DefaultAzureCredentialResourceIdOptions,\n} from \"./credentials/defaultAzureCredentialOptions\";\n\nexport { EnvironmentCredential } from \"./credentials/environmentCredential\";\nexport { EnvironmentCredentialOptions } from \"./credentials/environmentCredentialOptions\";\n\nexport {\n ClientCertificateCredential,\n ClientCertificateCredentialPEMConfiguration,\n ClientCertificatePEMCertificatePath,\n ClientCertificatePEMCertificate,\n} from \"./credentials/clientCertificateCredential\";\nexport { ClientCertificateCredentialOptions } from \"./credentials/clientCertificateCredentialOptions\";\nexport { ClientAssertionCredential } from \"./credentials/clientAssertionCredential\";\nexport { ClientAssertionCredentialOptions } from \"./credentials/clientAssertionCredentialOptions\";\nexport { CredentialPersistenceOptions } from \"./credentials/credentialPersistenceOptions\";\nexport { AzureCliCredential } from \"./credentials/azureCliCredential\";\nexport { AzureCliCredentialOptions } from \"./credentials/azureCliCredentialOptions\";\nexport { AzureDeveloperCliCredential } from \"./credentials/azureDeveloperCliCredential\";\nexport { AzureDeveloperCliCredentialOptions } from \"./credentials/azureDeveloperCliCredentialOptions\";\nexport { InteractiveBrowserCredential } from \"./credentials/interactiveBrowserCredential\";\nexport {\n InteractiveBrowserCredentialNodeOptions,\n InteractiveBrowserCredentialInBrowserOptions,\n BrowserLoginStyle,\n} from \"./credentials/interactiveBrowserCredentialOptions\";\nexport {\n ManagedIdentityCredential,\n ManagedIdentityCredentialClientIdOptions,\n ManagedIdentityCredentialResourceIdOptions,\n ManagedIdentityCredentialObjectIdOptions,\n} from \"./credentials/managedIdentityCredential\";\nexport { DeviceCodeCredential } from \"./credentials/deviceCodeCredential\";\nexport {\n DeviceCodePromptCallback,\n DeviceCodeInfo,\n} from \"./credentials/deviceCodeCredentialOptions\";\nexport { DeviceCodeCredentialOptions } from \"./credentials/deviceCodeCredentialOptions\";\nexport { AzurePipelinesCredential as AzurePipelinesCredential } from \"./credentials/azurePipelinesCredential\";\nexport { AzurePipelinesCredentialOptions as AzurePipelinesCredentialOptions } from \"./credentials/azurePipelinesCredentialOptions\";\nexport { AuthorizationCodeCredential } from \"./credentials/authorizationCodeCredential\";\nexport { AuthorizationCodeCredentialOptions } from \"./credentials/authorizationCodeCredentialOptions\";\nexport { AzurePowerShellCredential } from \"./credentials/azurePowerShellCredential\";\nexport { AzurePowerShellCredentialOptions } from \"./credentials/azurePowerShellCredentialOptions\";\nexport {\n OnBehalfOfCredentialOptions,\n OnBehalfOfCredentialSecretOptions,\n OnBehalfOfCredentialCertificateOptions,\n OnBehalfOfCredentialAssertionOptions,\n} from \"./credentials/onBehalfOfCredentialOptions\";\nexport { UsernamePasswordCredential } from \"./credentials/usernamePasswordCredential\";\nexport { UsernamePasswordCredentialOptions } from \"./credentials/usernamePasswordCredentialOptions\";\nexport { VisualStudioCodeCredential } from \"./credentials/visualStudioCodeCredential\";\nexport { VisualStudioCodeCredentialOptions } from \"./credentials/visualStudioCodeCredentialOptions\";\nexport { OnBehalfOfCredential } from \"./credentials/onBehalfOfCredential\";\nexport { WorkloadIdentityCredential } from \"./credentials/workloadIdentityCredential\";\nexport { WorkloadIdentityCredentialOptions } from \"./credentials/workloadIdentityCredentialOptions\";\nexport { BrowserCustomizationOptions } from \"./credentials/browserCustomizationOptions\";\nexport { TokenCachePersistenceOptions } from \"./msal/nodeFlows/tokenCachePersistenceOptions\";\n\nexport { TokenCredential, GetTokenOptions, AccessToken } from \"@azure/core-auth\";\nexport { logger } from \"./util/logging\";\n\nexport { AzureAuthorityHosts } from \"./constants\";\n\n/**\n * Returns a new instance of the {@link DefaultAzureCredential}.\n */\nexport function getDefaultAzureCredential(): TokenCredential {\n return new DefaultAzureCredential();\n}\n\nexport { getBearerTokenProvider, GetBearerTokenProviderOptions } from \"./tokenProvider\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"msal.js","sourceRoot":"","sources":["../../../../../identity/src/msal/msal.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as msalCommon from \"@azure/msal-node\";\n\nexport { msalCommon };\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brokerOptions.js","sourceRoot":"","sources":["../../../../../../identity/src/msal/nodeFlows/brokerOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Parameters that enable WAM broker authentication in the InteractiveBrowserCredential.\n */\nexport type BrokerOptions = BrokerEnabledOptions | BrokerDisabledOptions;\n\n/**\n * Parameters when WAM broker authentication is disabled.\n */\nexport interface BrokerDisabledOptions {\n /**\n * If set to true, broker will be enabled for WAM support on Windows.\n */\n enabled: false;\n\n /**\n * If set to true, MSA account will be passed through, required for WAM authentication.\n */\n legacyEnableMsaPassthrough?: undefined;\n /**\n * Window handle for parent window, required for WAM authentication.\n */\n parentWindowHandle: undefined;\n}\n\n/**\n * Parameters when WAM broker authentication is enabled.\n */\nexport interface BrokerEnabledOptions {\n /**\n * If set to true, broker will be enabled for WAM support on Windows.\n */\n enabled: true;\n /**\n * If set to true, MSA account will be passed through, required for WAM authentication.\n */\n legacyEnableMsaPassthrough?: boolean;\n /**\n * Window handle for parent window, required for WAM authentication.\n */\n parentWindowHandle: Uint8Array;\n\n /**\n * If set to true, the credential will attempt to use the default broker account for authentication before falling back to interactive authentication.\n * Default is set to false.\n */\n useDefaultBrokerAccount?: boolean;\n}\n"]}
|
|
@@ -1,511 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { __awaiter } from "tslib";
|
|
4
|
-
import * as msal from "@azure/msal-node";
|
|
5
|
-
import { credentialLogger, formatSuccess } from "../../util/logging";
|
|
6
|
-
import { msalPlugins } from "./msalPlugins";
|
|
7
|
-
import { defaultLoggerCallback, ensureValidMsalToken, getAuthority, getAuthorityHost, getKnownAuthorities, getMSALLogLevel, handleMsalError, msalToPublic, publicToMsal, } from "../utils";
|
|
8
|
-
import { AuthenticationRequiredError } from "../../errors";
|
|
9
|
-
import { IdentityClient } from "../../client/identityClient";
|
|
10
|
-
import { calculateRegionalAuthority } from "../../regionalAuthority";
|
|
11
|
-
import { getLogLevel } from "@azure/logger";
|
|
12
|
-
import open from "open";
|
|
13
|
-
import { resolveTenantId } from "../../util/tenantIdUtils";
|
|
14
|
-
/**
|
|
15
|
-
* The default logger used if no logger was passed in by the credential.
|
|
16
|
-
*/
|
|
17
|
-
const msalLogger = credentialLogger("MsalClient");
|
|
18
|
-
/**
|
|
19
|
-
* A call to open(), but mockable
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export const interactiveBrowserMockable = {
|
|
23
|
-
open,
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Generates the configuration for MSAL (Microsoft Authentication Library).
|
|
27
|
-
*
|
|
28
|
-
* @param clientId - The client ID of the application.
|
|
29
|
-
* @param tenantId - The tenant ID of the Azure Active Directory.
|
|
30
|
-
* @param msalClientOptions - Optional. Additional options for creating the MSAL client.
|
|
31
|
-
* @returns The MSAL configuration object.
|
|
32
|
-
*/
|
|
33
|
-
export function generateMsalConfiguration(clientId, tenantId, msalClientOptions = {}) {
|
|
34
|
-
var _a, _b, _c;
|
|
35
|
-
const resolvedTenant = resolveTenantId((_a = msalClientOptions.logger) !== null && _a !== void 0 ? _a : msalLogger, tenantId, clientId);
|
|
36
|
-
// TODO: move and reuse getIdentityClientAuthorityHost
|
|
37
|
-
const authority = getAuthority(resolvedTenant, getAuthorityHost(msalClientOptions));
|
|
38
|
-
const httpClient = new IdentityClient(Object.assign(Object.assign({}, msalClientOptions.tokenCredentialOptions), { authorityHost: authority, loggingOptions: msalClientOptions.loggingOptions }));
|
|
39
|
-
const msalConfig = {
|
|
40
|
-
auth: {
|
|
41
|
-
clientId,
|
|
42
|
-
authority,
|
|
43
|
-
knownAuthorities: getKnownAuthorities(resolvedTenant, authority, msalClientOptions.disableInstanceDiscovery),
|
|
44
|
-
},
|
|
45
|
-
system: {
|
|
46
|
-
networkClient: httpClient,
|
|
47
|
-
loggerOptions: {
|
|
48
|
-
loggerCallback: defaultLoggerCallback((_b = msalClientOptions.logger) !== null && _b !== void 0 ? _b : msalLogger),
|
|
49
|
-
logLevel: getMSALLogLevel(getLogLevel()),
|
|
50
|
-
piiLoggingEnabled: (_c = msalClientOptions.loggingOptions) === null || _c === void 0 ? void 0 : _c.enableUnsafeSupportLogging,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
return msalConfig;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Creates an instance of the MSAL (Microsoft Authentication Library) client.
|
|
58
|
-
*
|
|
59
|
-
* @param clientId - The client ID of the application.
|
|
60
|
-
* @param tenantId - The tenant ID of the Azure Active Directory.
|
|
61
|
-
* @param createMsalClientOptions - Optional. Additional options for creating the MSAL client.
|
|
62
|
-
* @returns An instance of the MSAL client.
|
|
63
|
-
*
|
|
64
|
-
* @public
|
|
65
|
-
*/
|
|
66
|
-
export function createMsalClient(clientId, tenantId, createMsalClientOptions = {}) {
|
|
67
|
-
var _a;
|
|
68
|
-
const state = {
|
|
69
|
-
msalConfig: generateMsalConfiguration(clientId, tenantId, createMsalClientOptions),
|
|
70
|
-
cachedAccount: createMsalClientOptions.authenticationRecord
|
|
71
|
-
? publicToMsal(createMsalClientOptions.authenticationRecord)
|
|
72
|
-
: null,
|
|
73
|
-
pluginConfiguration: msalPlugins.generatePluginConfiguration(createMsalClientOptions),
|
|
74
|
-
logger: (_a = createMsalClientOptions.logger) !== null && _a !== void 0 ? _a : msalLogger,
|
|
75
|
-
};
|
|
76
|
-
const publicApps = new Map();
|
|
77
|
-
function getPublicApp() {
|
|
78
|
-
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
79
|
-
const appKey = options.enableCae ? "CAE" : "default";
|
|
80
|
-
let publicClientApp = publicApps.get(appKey);
|
|
81
|
-
if (publicClientApp) {
|
|
82
|
-
state.logger.getToken.info("Existing PublicClientApplication found in cache, returning it.");
|
|
83
|
-
return publicClientApp;
|
|
84
|
-
}
|
|
85
|
-
// Initialize a new app and cache it
|
|
86
|
-
state.logger.getToken.info(`Creating new PublicClientApplication with CAE ${options.enableCae ? "enabled" : "disabled"}.`);
|
|
87
|
-
const cachePlugin = options.enableCae
|
|
88
|
-
? state.pluginConfiguration.cache.cachePluginCae
|
|
89
|
-
: state.pluginConfiguration.cache.cachePlugin;
|
|
90
|
-
state.msalConfig.auth.clientCapabilities = options.enableCae ? ["cp1"] : undefined;
|
|
91
|
-
publicClientApp = new msal.PublicClientApplication(Object.assign(Object.assign({}, state.msalConfig), { broker: { nativeBrokerPlugin: state.pluginConfiguration.broker.nativeBrokerPlugin }, cache: { cachePlugin: yield cachePlugin } }));
|
|
92
|
-
publicApps.set(appKey, publicClientApp);
|
|
93
|
-
return publicClientApp;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
const confidentialApps = new Map();
|
|
97
|
-
function getConfidentialApp() {
|
|
98
|
-
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
99
|
-
const appKey = options.enableCae ? "CAE" : "default";
|
|
100
|
-
let confidentialClientApp = confidentialApps.get(appKey);
|
|
101
|
-
if (confidentialClientApp) {
|
|
102
|
-
state.logger.getToken.info("Existing ConfidentialClientApplication found in cache, returning it.");
|
|
103
|
-
return confidentialClientApp;
|
|
104
|
-
}
|
|
105
|
-
// Initialize a new app and cache it
|
|
106
|
-
state.logger.getToken.info(`Creating new ConfidentialClientApplication with CAE ${options.enableCae ? "enabled" : "disabled"}.`);
|
|
107
|
-
const cachePlugin = options.enableCae
|
|
108
|
-
? state.pluginConfiguration.cache.cachePluginCae
|
|
109
|
-
: state.pluginConfiguration.cache.cachePlugin;
|
|
110
|
-
state.msalConfig.auth.clientCapabilities = options.enableCae ? ["cp1"] : undefined;
|
|
111
|
-
confidentialClientApp = new msal.ConfidentialClientApplication(Object.assign(Object.assign({}, state.msalConfig), { broker: { nativeBrokerPlugin: state.pluginConfiguration.broker.nativeBrokerPlugin }, cache: { cachePlugin: yield cachePlugin } }));
|
|
112
|
-
confidentialApps.set(appKey, confidentialClientApp);
|
|
113
|
-
return confidentialClientApp;
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
function getTokenSilent(app_1, scopes_1) {
|
|
117
|
-
return __awaiter(this, arguments, void 0, function* (app, scopes, options = {}) {
|
|
118
|
-
if (state.cachedAccount === null) {
|
|
119
|
-
state.logger.getToken.info("No cached account found in local state, attempting to load it from MSAL cache.");
|
|
120
|
-
const cache = app.getTokenCache();
|
|
121
|
-
const accounts = yield cache.getAllAccounts();
|
|
122
|
-
if (accounts === undefined || accounts.length === 0) {
|
|
123
|
-
throw new AuthenticationRequiredError({ scopes });
|
|
124
|
-
}
|
|
125
|
-
if (accounts.length > 1) {
|
|
126
|
-
state.logger
|
|
127
|
-
.info(`More than one account was found authenticated for this Client ID and Tenant ID.
|
|
128
|
-
However, no "authenticationRecord" has been provided for this credential,
|
|
129
|
-
therefore we're unable to pick between these accounts.
|
|
130
|
-
A new login attempt will be requested, to ensure the correct account is picked.
|
|
131
|
-
To work with multiple accounts for the same Client ID and Tenant ID, please provide an "authenticationRecord" when initializing a credential to prevent this from happening.`);
|
|
132
|
-
throw new AuthenticationRequiredError({ scopes });
|
|
133
|
-
}
|
|
134
|
-
state.cachedAccount = accounts[0];
|
|
135
|
-
}
|
|
136
|
-
// Keep track and reuse the claims we received across challenges
|
|
137
|
-
if (options.claims) {
|
|
138
|
-
state.cachedClaims = options.claims;
|
|
139
|
-
}
|
|
140
|
-
const silentRequest = {
|
|
141
|
-
account: state.cachedAccount,
|
|
142
|
-
scopes,
|
|
143
|
-
claims: state.cachedClaims,
|
|
144
|
-
};
|
|
145
|
-
if (state.pluginConfiguration.broker.isEnabled) {
|
|
146
|
-
silentRequest.tokenQueryParameters || (silentRequest.tokenQueryParameters = {});
|
|
147
|
-
if (state.pluginConfiguration.broker.enableMsaPassthrough) {
|
|
148
|
-
silentRequest.tokenQueryParameters["msal_request_type"] = "consumer_passthrough";
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
if (options.proofOfPossessionOptions) {
|
|
152
|
-
silentRequest.shrNonce = options.proofOfPossessionOptions.nonce;
|
|
153
|
-
silentRequest.authenticationScheme = "pop";
|
|
154
|
-
silentRequest.resourceRequestMethod = options.proofOfPossessionOptions.resourceRequestMethod;
|
|
155
|
-
silentRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;
|
|
156
|
-
}
|
|
157
|
-
state.logger.getToken.info("Attempting to acquire token silently");
|
|
158
|
-
return app.acquireTokenSilent(silentRequest);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Builds an authority URL for the given request. The authority may be different than the one used when creating the MSAL client
|
|
163
|
-
* if the user is creating cross-tenant requests
|
|
164
|
-
*/
|
|
165
|
-
function calculateRequestAuthority(options) {
|
|
166
|
-
if (options === null || options === void 0 ? void 0 : options.tenantId) {
|
|
167
|
-
return getAuthority(options.tenantId, getAuthorityHost(createMsalClientOptions));
|
|
168
|
-
}
|
|
169
|
-
return state.msalConfig.auth.authority;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Performs silent authentication using MSAL to acquire an access token.
|
|
173
|
-
* If silent authentication fails, falls back to interactive authentication.
|
|
174
|
-
*
|
|
175
|
-
* @param msalApp - The MSAL application instance.
|
|
176
|
-
* @param scopes - The scopes for which to acquire the access token.
|
|
177
|
-
* @param options - The options for acquiring the access token.
|
|
178
|
-
* @param onAuthenticationRequired - A callback function to handle interactive authentication when silent authentication fails.
|
|
179
|
-
* @returns A promise that resolves to an AccessToken object containing the access token and its expiration timestamp.
|
|
180
|
-
*/
|
|
181
|
-
function withSilentAuthentication(msalApp, scopes, options, onAuthenticationRequired) {
|
|
182
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
var _a, _b;
|
|
184
|
-
let response = null;
|
|
185
|
-
try {
|
|
186
|
-
response = yield getTokenSilent(msalApp, scopes, options);
|
|
187
|
-
}
|
|
188
|
-
catch (e) {
|
|
189
|
-
if (e.name !== "AuthenticationRequiredError") {
|
|
190
|
-
throw e;
|
|
191
|
-
}
|
|
192
|
-
if (options.disableAutomaticAuthentication) {
|
|
193
|
-
throw new AuthenticationRequiredError({
|
|
194
|
-
scopes,
|
|
195
|
-
getTokenOptions: options,
|
|
196
|
-
message: "Automatic authentication has been disabled. You may call the authentication() method.",
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// Silent authentication failed
|
|
201
|
-
if (response === null) {
|
|
202
|
-
try {
|
|
203
|
-
response = yield onAuthenticationRequired();
|
|
204
|
-
}
|
|
205
|
-
catch (err) {
|
|
206
|
-
throw handleMsalError(scopes, err, options);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
// At this point we should have a token, process it
|
|
210
|
-
ensureValidMsalToken(scopes, response, options);
|
|
211
|
-
state.cachedAccount = (_a = response === null || response === void 0 ? void 0 : response.account) !== null && _a !== void 0 ? _a : null;
|
|
212
|
-
state.logger.getToken.info(formatSuccess(scopes));
|
|
213
|
-
return {
|
|
214
|
-
token: response.accessToken,
|
|
215
|
-
expiresOnTimestamp: response.expiresOn.getTime(),
|
|
216
|
-
refreshAfterTimestamp: (_b = response.refreshOn) === null || _b === void 0 ? void 0 : _b.getTime(),
|
|
217
|
-
tokenType: response.tokenType,
|
|
218
|
-
};
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
function getTokenByClientSecret(scopes_1, clientSecret_1) {
|
|
222
|
-
return __awaiter(this, arguments, void 0, function* (scopes, clientSecret, options = {}) {
|
|
223
|
-
var _a;
|
|
224
|
-
state.logger.getToken.info(`Attempting to acquire token using client secret`);
|
|
225
|
-
state.msalConfig.auth.clientSecret = clientSecret;
|
|
226
|
-
const msalApp = yield getConfidentialApp(options);
|
|
227
|
-
try {
|
|
228
|
-
const response = yield msalApp.acquireTokenByClientCredential({
|
|
229
|
-
scopes,
|
|
230
|
-
authority: calculateRequestAuthority(options),
|
|
231
|
-
azureRegion: calculateRegionalAuthority(),
|
|
232
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
233
|
-
});
|
|
234
|
-
ensureValidMsalToken(scopes, response, options);
|
|
235
|
-
state.logger.getToken.info(formatSuccess(scopes));
|
|
236
|
-
return {
|
|
237
|
-
token: response.accessToken,
|
|
238
|
-
expiresOnTimestamp: response.expiresOn.getTime(),
|
|
239
|
-
refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
240
|
-
tokenType: response.tokenType,
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
catch (err) {
|
|
244
|
-
throw handleMsalError(scopes, err, options);
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
function getTokenByClientAssertion(scopes_1, clientAssertion_1) {
|
|
249
|
-
return __awaiter(this, arguments, void 0, function* (scopes, clientAssertion, options = {}) {
|
|
250
|
-
var _a;
|
|
251
|
-
state.logger.getToken.info(`Attempting to acquire token using client assertion`);
|
|
252
|
-
state.msalConfig.auth.clientAssertion = clientAssertion;
|
|
253
|
-
const msalApp = yield getConfidentialApp(options);
|
|
254
|
-
try {
|
|
255
|
-
const response = yield msalApp.acquireTokenByClientCredential({
|
|
256
|
-
scopes,
|
|
257
|
-
authority: calculateRequestAuthority(options),
|
|
258
|
-
azureRegion: calculateRegionalAuthority(),
|
|
259
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
260
|
-
clientAssertion,
|
|
261
|
-
});
|
|
262
|
-
ensureValidMsalToken(scopes, response, options);
|
|
263
|
-
state.logger.getToken.info(formatSuccess(scopes));
|
|
264
|
-
return {
|
|
265
|
-
token: response.accessToken,
|
|
266
|
-
expiresOnTimestamp: response.expiresOn.getTime(),
|
|
267
|
-
refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
268
|
-
tokenType: response.tokenType,
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
catch (err) {
|
|
272
|
-
throw handleMsalError(scopes, err, options);
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
function getTokenByClientCertificate(scopes_1, certificate_1) {
|
|
277
|
-
return __awaiter(this, arguments, void 0, function* (scopes, certificate, options = {}) {
|
|
278
|
-
var _a;
|
|
279
|
-
state.logger.getToken.info(`Attempting to acquire token using client certificate`);
|
|
280
|
-
state.msalConfig.auth.clientCertificate = certificate;
|
|
281
|
-
const msalApp = yield getConfidentialApp(options);
|
|
282
|
-
try {
|
|
283
|
-
const response = yield msalApp.acquireTokenByClientCredential({
|
|
284
|
-
scopes,
|
|
285
|
-
authority: calculateRequestAuthority(options),
|
|
286
|
-
azureRegion: calculateRegionalAuthority(),
|
|
287
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
288
|
-
});
|
|
289
|
-
ensureValidMsalToken(scopes, response, options);
|
|
290
|
-
state.logger.getToken.info(formatSuccess(scopes));
|
|
291
|
-
return {
|
|
292
|
-
token: response.accessToken,
|
|
293
|
-
expiresOnTimestamp: response.expiresOn.getTime(),
|
|
294
|
-
refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
295
|
-
tokenType: response.tokenType,
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
catch (err) {
|
|
299
|
-
throw handleMsalError(scopes, err, options);
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
function getTokenByDeviceCode(scopes_1, deviceCodeCallback_1) {
|
|
304
|
-
return __awaiter(this, arguments, void 0, function* (scopes, deviceCodeCallback, options = {}) {
|
|
305
|
-
state.logger.getToken.info(`Attempting to acquire token using device code`);
|
|
306
|
-
const msalApp = yield getPublicApp(options);
|
|
307
|
-
return withSilentAuthentication(msalApp, scopes, options, () => {
|
|
308
|
-
var _a, _b;
|
|
309
|
-
const requestOptions = {
|
|
310
|
-
scopes,
|
|
311
|
-
cancel: (_b = (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) !== null && _b !== void 0 ? _b : false,
|
|
312
|
-
deviceCodeCallback,
|
|
313
|
-
authority: calculateRequestAuthority(options),
|
|
314
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
315
|
-
};
|
|
316
|
-
const deviceCodeRequest = msalApp.acquireTokenByDeviceCode(requestOptions);
|
|
317
|
-
if (options.abortSignal) {
|
|
318
|
-
options.abortSignal.addEventListener("abort", () => {
|
|
319
|
-
requestOptions.cancel = true;
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
return deviceCodeRequest;
|
|
323
|
-
});
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
function getTokenByUsernamePassword(scopes_1, username_1, password_1) {
|
|
327
|
-
return __awaiter(this, arguments, void 0, function* (scopes, username, password, options = {}) {
|
|
328
|
-
state.logger.getToken.info(`Attempting to acquire token using username and password`);
|
|
329
|
-
const msalApp = yield getPublicApp(options);
|
|
330
|
-
return withSilentAuthentication(msalApp, scopes, options, () => {
|
|
331
|
-
const requestOptions = {
|
|
332
|
-
scopes,
|
|
333
|
-
username,
|
|
334
|
-
password,
|
|
335
|
-
authority: calculateRequestAuthority(options),
|
|
336
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
337
|
-
};
|
|
338
|
-
return msalApp.acquireTokenByUsernamePassword(requestOptions);
|
|
339
|
-
});
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
function getActiveAccount() {
|
|
343
|
-
if (!state.cachedAccount) {
|
|
344
|
-
return undefined;
|
|
345
|
-
}
|
|
346
|
-
return msalToPublic(clientId, state.cachedAccount);
|
|
347
|
-
}
|
|
348
|
-
function getTokenByAuthorizationCode(scopes_1, redirectUri_1, authorizationCode_1, clientSecret_1) {
|
|
349
|
-
return __awaiter(this, arguments, void 0, function* (scopes, redirectUri, authorizationCode, clientSecret, options = {}) {
|
|
350
|
-
state.logger.getToken.info(`Attempting to acquire token using authorization code`);
|
|
351
|
-
let msalApp;
|
|
352
|
-
if (clientSecret) {
|
|
353
|
-
// If a client secret is provided, we need to use a confidential client application
|
|
354
|
-
// See https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow#request-an-access-token-with-a-client_secret
|
|
355
|
-
state.msalConfig.auth.clientSecret = clientSecret;
|
|
356
|
-
msalApp = yield getConfidentialApp(options);
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
msalApp = yield getPublicApp(options);
|
|
360
|
-
}
|
|
361
|
-
return withSilentAuthentication(msalApp, scopes, options, () => {
|
|
362
|
-
return msalApp.acquireTokenByCode({
|
|
363
|
-
scopes,
|
|
364
|
-
redirectUri,
|
|
365
|
-
code: authorizationCode,
|
|
366
|
-
authority: calculateRequestAuthority(options),
|
|
367
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
function getTokenOnBehalfOf(scopes_1, userAssertionToken_1, clientCredentials_1) {
|
|
373
|
-
return __awaiter(this, arguments, void 0, function* (scopes, userAssertionToken, clientCredentials, options = {}) {
|
|
374
|
-
var _a;
|
|
375
|
-
msalLogger.getToken.info(`Attempting to acquire token on behalf of another user`);
|
|
376
|
-
if (typeof clientCredentials === "string") {
|
|
377
|
-
// Client secret
|
|
378
|
-
msalLogger.getToken.info(`Using client secret for on behalf of flow`);
|
|
379
|
-
state.msalConfig.auth.clientSecret = clientCredentials;
|
|
380
|
-
}
|
|
381
|
-
else if (typeof clientCredentials === "function") {
|
|
382
|
-
// Client Assertion
|
|
383
|
-
msalLogger.getToken.info(`Using client assertion callback for on behalf of flow`);
|
|
384
|
-
state.msalConfig.auth.clientAssertion = clientCredentials;
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
// Client certificate
|
|
388
|
-
msalLogger.getToken.info(`Using client certificate for on behalf of flow`);
|
|
389
|
-
state.msalConfig.auth.clientCertificate = clientCredentials;
|
|
390
|
-
}
|
|
391
|
-
const msalApp = yield getConfidentialApp(options);
|
|
392
|
-
try {
|
|
393
|
-
const response = yield msalApp.acquireTokenOnBehalfOf({
|
|
394
|
-
scopes,
|
|
395
|
-
authority: calculateRequestAuthority(options),
|
|
396
|
-
claims: options.claims,
|
|
397
|
-
oboAssertion: userAssertionToken,
|
|
398
|
-
});
|
|
399
|
-
ensureValidMsalToken(scopes, response, options);
|
|
400
|
-
msalLogger.getToken.info(formatSuccess(scopes));
|
|
401
|
-
return {
|
|
402
|
-
token: response.accessToken,
|
|
403
|
-
expiresOnTimestamp: response.expiresOn.getTime(),
|
|
404
|
-
refreshAfterTimestamp: (_a = response.refreshOn) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
405
|
-
tokenType: response.tokenType,
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
catch (err) {
|
|
409
|
-
throw handleMsalError(scopes, err, options);
|
|
410
|
-
}
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
function getTokenByInteractiveRequest(scopes_1) {
|
|
414
|
-
return __awaiter(this, arguments, void 0, function* (scopes, options = {}) {
|
|
415
|
-
msalLogger.getToken.info(`Attempting to acquire token interactively`);
|
|
416
|
-
const app = yield getPublicApp(options);
|
|
417
|
-
/**
|
|
418
|
-
* A helper function that supports brokered authentication through the MSAL's public application.
|
|
419
|
-
*
|
|
420
|
-
* When options.useDefaultBrokerAccount is true, the method will attempt to authenticate using the default broker account.
|
|
421
|
-
* If the default broker account is not available, the method will fall back to interactive authentication.
|
|
422
|
-
*/
|
|
423
|
-
function getBrokeredToken(useDefaultBrokerAccount) {
|
|
424
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
425
|
-
var _a;
|
|
426
|
-
msalLogger.verbose("Authentication will resume through the broker");
|
|
427
|
-
const interactiveRequest = createBaseInteractiveRequest();
|
|
428
|
-
if (state.pluginConfiguration.broker.parentWindowHandle) {
|
|
429
|
-
interactiveRequest.windowHandle = Buffer.from(state.pluginConfiguration.broker.parentWindowHandle);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
// this is a bug, as the pluginConfiguration handler should validate this case.
|
|
433
|
-
msalLogger.warning("Parent window handle is not specified for the broker. This may cause unexpected behavior. Please provide the parentWindowHandle.");
|
|
434
|
-
}
|
|
435
|
-
if (state.pluginConfiguration.broker.enableMsaPassthrough) {
|
|
436
|
-
((_a = interactiveRequest.tokenQueryParameters) !== null && _a !== void 0 ? _a : (interactiveRequest.tokenQueryParameters = {}))["msal_request_type"] =
|
|
437
|
-
"consumer_passthrough";
|
|
438
|
-
}
|
|
439
|
-
if (useDefaultBrokerAccount) {
|
|
440
|
-
interactiveRequest.prompt = "none";
|
|
441
|
-
msalLogger.verbose("Attempting broker authentication using the default broker account");
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
msalLogger.verbose("Attempting broker authentication without the default broker account");
|
|
445
|
-
}
|
|
446
|
-
if (options.proofOfPossessionOptions) {
|
|
447
|
-
interactiveRequest.shrNonce = options.proofOfPossessionOptions.nonce;
|
|
448
|
-
interactiveRequest.authenticationScheme = "pop";
|
|
449
|
-
interactiveRequest.resourceRequestMethod =
|
|
450
|
-
options.proofOfPossessionOptions.resourceRequestMethod;
|
|
451
|
-
interactiveRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;
|
|
452
|
-
}
|
|
453
|
-
try {
|
|
454
|
-
return yield app.acquireTokenInteractive(interactiveRequest);
|
|
455
|
-
}
|
|
456
|
-
catch (e) {
|
|
457
|
-
msalLogger.verbose(`Failed to authenticate through the broker: ${e.message}`);
|
|
458
|
-
// If we tried to use the default broker account and failed, fall back to interactive authentication
|
|
459
|
-
if (useDefaultBrokerAccount) {
|
|
460
|
-
return getBrokeredToken(/* useDefaultBrokerAccount: */ false);
|
|
461
|
-
}
|
|
462
|
-
else {
|
|
463
|
-
throw e;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
function createBaseInteractiveRequest() {
|
|
469
|
-
var _a, _b;
|
|
470
|
-
return {
|
|
471
|
-
openBrowser: (url) => __awaiter(this, void 0, void 0, function* () {
|
|
472
|
-
yield interactiveBrowserMockable.open(url, { wait: true, newInstance: true });
|
|
473
|
-
}),
|
|
474
|
-
scopes,
|
|
475
|
-
authority: calculateRequestAuthority(options),
|
|
476
|
-
claims: options === null || options === void 0 ? void 0 : options.claims,
|
|
477
|
-
loginHint: options === null || options === void 0 ? void 0 : options.loginHint,
|
|
478
|
-
errorTemplate: (_a = options === null || options === void 0 ? void 0 : options.browserCustomizationOptions) === null || _a === void 0 ? void 0 : _a.errorMessage,
|
|
479
|
-
successTemplate: (_b = options === null || options === void 0 ? void 0 : options.browserCustomizationOptions) === null || _b === void 0 ? void 0 : _b.successMessage,
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
return withSilentAuthentication(app, scopes, options, () => __awaiter(this, void 0, void 0, function* () {
|
|
483
|
-
var _a;
|
|
484
|
-
const interactiveRequest = createBaseInteractiveRequest();
|
|
485
|
-
if (state.pluginConfiguration.broker.isEnabled) {
|
|
486
|
-
return getBrokeredToken((_a = state.pluginConfiguration.broker.useDefaultBrokerAccount) !== null && _a !== void 0 ? _a : false);
|
|
487
|
-
}
|
|
488
|
-
if (options.proofOfPossessionOptions) {
|
|
489
|
-
interactiveRequest.shrNonce = options.proofOfPossessionOptions.nonce;
|
|
490
|
-
interactiveRequest.authenticationScheme = "pop";
|
|
491
|
-
interactiveRequest.resourceRequestMethod =
|
|
492
|
-
options.proofOfPossessionOptions.resourceRequestMethod;
|
|
493
|
-
interactiveRequest.resourceRequestUri = options.proofOfPossessionOptions.resourceRequestUrl;
|
|
494
|
-
}
|
|
495
|
-
return app.acquireTokenInteractive(interactiveRequest);
|
|
496
|
-
}));
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
return {
|
|
500
|
-
getActiveAccount,
|
|
501
|
-
getTokenByClientSecret,
|
|
502
|
-
getTokenByClientAssertion,
|
|
503
|
-
getTokenByClientCertificate,
|
|
504
|
-
getTokenByDeviceCode,
|
|
505
|
-
getTokenByUsernamePassword,
|
|
506
|
-
getTokenByAuthorizationCode,
|
|
507
|
-
getTokenOnBehalfOf,
|
|
508
|
-
getTokenByInteractiveRequest,
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
//# sourceMappingURL=msalClient.js.map
|