@azure/msal-node 5.0.0-beta.0 → 5.0.1

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.
Files changed (132) hide show
  1. package/dist/cache/CacheHelpers.mjs +1 -1
  2. package/dist/cache/NodeStorage.mjs +1 -1
  3. package/dist/cache/TokenCache.mjs +1 -1
  4. package/dist/cache/distributed/DistributedCachePlugin.mjs +1 -1
  5. package/dist/cache/serializer/Deserializer.mjs +1 -1
  6. package/dist/cache/serializer/Serializer.mjs +1 -1
  7. package/dist/client/BaseClient.mjs +1 -1
  8. package/dist/client/ClientApplication.mjs +1 -1
  9. package/dist/client/ClientAssertion.mjs +1 -1
  10. package/dist/client/ClientCredentialClient.mjs +1 -1
  11. package/dist/client/ConfidentialClientApplication.mjs +1 -1
  12. package/dist/client/DeviceCodeClient.mjs +1 -1
  13. package/dist/client/ManagedIdentityApplication.mjs +1 -1
  14. package/dist/client/ManagedIdentityClient.mjs +1 -1
  15. package/dist/client/ManagedIdentitySources/AppService.mjs +1 -1
  16. package/dist/client/ManagedIdentitySources/AzureArc.mjs +1 -1
  17. package/dist/client/ManagedIdentitySources/BaseManagedIdentitySource.mjs +1 -1
  18. package/dist/client/ManagedIdentitySources/CloudShell.mjs +1 -1
  19. package/dist/client/ManagedIdentitySources/Imds.mjs +1 -1
  20. package/dist/client/ManagedIdentitySources/MachineLearning.mjs +1 -1
  21. package/dist/client/ManagedIdentitySources/ServiceFabric.mjs +1 -1
  22. package/dist/client/OnBehalfOfClient.mjs +1 -1
  23. package/dist/client/PublicClientApplication.mjs +1 -1
  24. package/dist/client/UsernamePasswordClient.mjs +1 -1
  25. package/dist/config/Configuration.mjs +1 -1
  26. package/dist/config/ManagedIdentityId.mjs +1 -1
  27. package/dist/config/ManagedIdentityRequestParameters.mjs +1 -1
  28. package/dist/crypto/CryptoProvider.mjs +1 -1
  29. package/dist/crypto/GuidGenerator.mjs +1 -1
  30. package/dist/crypto/HashUtils.mjs +1 -1
  31. package/dist/crypto/PkceGenerator.mjs +1 -1
  32. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  33. package/dist/error/ManagedIdentityError.mjs +1 -1
  34. package/dist/error/ManagedIdentityErrorCodes.mjs +1 -1
  35. package/dist/error/NodeAuthError.mjs +1 -1
  36. package/dist/index.mjs +1 -1
  37. package/dist/internals.mjs +1 -1
  38. package/dist/network/HttpClient.mjs +1 -1
  39. package/dist/network/HttpClientWithRetries.mjs +1 -1
  40. package/dist/network/LoopbackClient.mjs +1 -1
  41. package/dist/packageMetadata.d.ts +1 -1
  42. package/dist/packageMetadata.d.ts.map +1 -1
  43. package/dist/packageMetadata.mjs +2 -2
  44. package/dist/protocol/Authorize.mjs +1 -1
  45. package/dist/request/AuthorizationCodeRequest.d.ts +12 -11
  46. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  47. package/dist/request/AuthorizationUrlRequest.d.ts +6 -24
  48. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  49. package/dist/request/ClientCredentialRequest.d.ts +3 -5
  50. package/dist/request/ClientCredentialRequest.d.ts.map +1 -1
  51. package/dist/request/CommonClientCredentialRequest.d.ts +9 -7
  52. package/dist/request/CommonClientCredentialRequest.d.ts.map +1 -1
  53. package/dist/request/CommonDeviceCodeRequest.d.ts +12 -10
  54. package/dist/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  55. package/dist/request/CommonOnBehalfOfRequest.d.ts +7 -5
  56. package/dist/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
  57. package/dist/request/CommonUsernamePasswordRequest.d.ts +6 -9
  58. package/dist/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
  59. package/dist/request/DeviceCodeRequest.d.ts +6 -6
  60. package/dist/request/DeviceCodeRequest.d.ts.map +1 -1
  61. package/dist/request/InteractiveRequest.d.ts +18 -7
  62. package/dist/request/InteractiveRequest.d.ts.map +1 -1
  63. package/dist/request/ManagedIdentityRequest.d.ts +6 -2
  64. package/dist/request/ManagedIdentityRequest.d.ts.map +1 -1
  65. package/dist/request/ManagedIdentityRequestParams.d.ts +9 -3
  66. package/dist/request/ManagedIdentityRequestParams.d.ts.map +1 -1
  67. package/dist/request/OnBehalfOfRequest.d.ts +7 -5
  68. package/dist/request/OnBehalfOfRequest.d.ts.map +1 -1
  69. package/dist/request/RefreshTokenRequest.d.ts +9 -8
  70. package/dist/request/RefreshTokenRequest.d.ts.map +1 -1
  71. package/dist/request/SilentFlowRequest.d.ts +6 -8
  72. package/dist/request/SilentFlowRequest.d.ts.map +1 -1
  73. package/dist/request/UsernamePasswordRequest.d.ts +9 -9
  74. package/dist/request/UsernamePasswordRequest.d.ts.map +1 -1
  75. package/dist/retry/DefaultManagedIdentityRetryPolicy.mjs +1 -1
  76. package/dist/retry/ExponentialRetryStrategy.mjs +1 -1
  77. package/dist/retry/ImdsRetryPolicy.mjs +1 -1
  78. package/dist/retry/LinearRetryStrategy.mjs +1 -1
  79. package/dist/utils/Constants.mjs +1 -1
  80. package/dist/utils/EncodingUtils.mjs +1 -1
  81. package/dist/utils/TimeUtils.mjs +1 -1
  82. package/lib/msal-node.cjs +73 -68
  83. package/lib/msal-node.cjs.map +1 -1
  84. package/lib/types/packageMetadata.d.ts +1 -1
  85. package/lib/types/packageMetadata.d.ts.map +1 -1
  86. package/lib/types/request/AuthorizationCodeRequest.d.ts +12 -11
  87. package/lib/types/request/AuthorizationCodeRequest.d.ts.map +1 -1
  88. package/lib/types/request/AuthorizationUrlRequest.d.ts +6 -24
  89. package/lib/types/request/AuthorizationUrlRequest.d.ts.map +1 -1
  90. package/lib/types/request/ClientCredentialRequest.d.ts +3 -5
  91. package/lib/types/request/ClientCredentialRequest.d.ts.map +1 -1
  92. package/lib/types/request/CommonClientCredentialRequest.d.ts +9 -7
  93. package/lib/types/request/CommonClientCredentialRequest.d.ts.map +1 -1
  94. package/lib/types/request/CommonDeviceCodeRequest.d.ts +12 -10
  95. package/lib/types/request/CommonDeviceCodeRequest.d.ts.map +1 -1
  96. package/lib/types/request/CommonOnBehalfOfRequest.d.ts +7 -5
  97. package/lib/types/request/CommonOnBehalfOfRequest.d.ts.map +1 -1
  98. package/lib/types/request/CommonUsernamePasswordRequest.d.ts +6 -9
  99. package/lib/types/request/CommonUsernamePasswordRequest.d.ts.map +1 -1
  100. package/lib/types/request/DeviceCodeRequest.d.ts +6 -6
  101. package/lib/types/request/DeviceCodeRequest.d.ts.map +1 -1
  102. package/lib/types/request/InteractiveRequest.d.ts +18 -7
  103. package/lib/types/request/InteractiveRequest.d.ts.map +1 -1
  104. package/lib/types/request/ManagedIdentityRequest.d.ts +6 -2
  105. package/lib/types/request/ManagedIdentityRequest.d.ts.map +1 -1
  106. package/lib/types/request/ManagedIdentityRequestParams.d.ts +9 -3
  107. package/lib/types/request/ManagedIdentityRequestParams.d.ts.map +1 -1
  108. package/lib/types/request/OnBehalfOfRequest.d.ts +7 -5
  109. package/lib/types/request/OnBehalfOfRequest.d.ts.map +1 -1
  110. package/lib/types/request/RefreshTokenRequest.d.ts +9 -8
  111. package/lib/types/request/RefreshTokenRequest.d.ts.map +1 -1
  112. package/lib/types/request/SilentFlowRequest.d.ts +6 -8
  113. package/lib/types/request/SilentFlowRequest.d.ts.map +1 -1
  114. package/lib/types/request/UsernamePasswordRequest.d.ts +9 -9
  115. package/lib/types/request/UsernamePasswordRequest.d.ts.map +1 -1
  116. package/package.json +2 -2
  117. package/src/packageMetadata.ts +1 -1
  118. package/src/request/AuthorizationCodeRequest.ts +12 -11
  119. package/src/request/AuthorizationUrlRequest.ts +6 -24
  120. package/src/request/ClientCredentialRequest.ts +3 -5
  121. package/src/request/CommonClientCredentialRequest.ts +9 -7
  122. package/src/request/CommonDeviceCodeRequest.ts +12 -10
  123. package/src/request/CommonOnBehalfOfRequest.ts +7 -5
  124. package/src/request/CommonUsernamePasswordRequest.ts +6 -9
  125. package/src/request/DeviceCodeRequest.ts +6 -6
  126. package/src/request/InteractiveRequest.ts +18 -7
  127. package/src/request/ManagedIdentityRequest.ts +6 -2
  128. package/src/request/ManagedIdentityRequestParams.ts +9 -3
  129. package/src/request/OnBehalfOfRequest.ts +7 -5
  130. package/src/request/RefreshTokenRequest.ts +9 -8
  131. package/src/request/SilentFlowRequest.ts +6 -8
  132. package/src/request/UsernamePasswordRequest.ts +9 -9
@@ -7,30 +7,6 @@ import { CommonAuthorizationUrlRequest } from "@azure/msal-common/node";
7
7
 
8
8
  /**
9
9
  * Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow)
10
- *
11
- * - scopes - Array of scopes the application is requesting access to.
12
- * - claims - A stringified claims request which will be added to all /authorize and /token calls
13
- * - authority - Url of the authority which the application acquires tokens from.
14
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
15
- * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
16
- * - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront.
17
- * - responseMode - Specifies the method that should be used to send the authentication result to your app. Can be query, form_post, or fragment. If no value is passed in, it defaults to query.
18
- * - codeChallenge - Used to secure authorization code grant via Proof of Key for Code Exchange (PKCE). For more information, see the PKCE RCF:https://tools.ietf.org/html/rfc7636
19
- * - codeChallengeMethod - The method used to encode the code verifier for the code challenge parameter. Can be "plain" or "S256". If excluded, code challenge is assumed to be plaintext. For more information, see the PKCE RCF: https://tools.ietf.org/html/rfc7636
20
- * - state - A value included in the request that is also returned in the token response. A randomly generated unique value is typically used for preventing cross site request forgery attacks. The state is also used to encode information about the user's state in the app before the authentication request occurred.
21
- * - prompt - Indicates the type of user interaction that is required.
22
- * login: will force the user to enter their credentials on that request, negating single-sign on
23
- * none: will ensure that the user isn't presented with any interactive prompt. if request can't be completed via single-sign on, the endpoint will return an interaction_required error
24
- * consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app
25
- * select_account: will interrupt single sign-=on providing account selection experience listing all the accounts in session or any remembered accounts or an option to choose to use a different account
26
- * create: will direct the user to the account creation experience instead of the log in experience
27
- * - account - AccountInfo obtained from a getAccount API. Will be used in certain scenarios to generate login_hint if both loginHint and sid params are not provided.
28
- * - loginHint - Can be used to pre-fill the username/email address field of the sign-in page for the user, if you know the username/email address ahead of time. Often apps use this parameter during re-authentication, having already extracted the username from a previous sign-in using the preferred_username claim.
29
- * - sid - Session ID, unique identifier for the session. Available as an optional claim on ID tokens.
30
- * - domainHint - Provides a hint about the tenant or domain that the user should use to sign in. The value of the domain hint is a registered domain for the tenant.
31
- * - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
32
- * - extraParameters - String to string map of custom query parameters added to outgoing token service requests
33
- * - nonce - A value included in the request that is returned in the id token. A randomly generated unique value is typically used to mitigate replay attacks.
34
10
  * @public
35
11
  */
36
12
  export type AuthorizationUrlRequest = Partial<
@@ -44,6 +20,12 @@ export type AuthorizationUrlRequest = Partial<
44
20
  | "storeInCache"
45
21
  >
46
22
  > & {
23
+ /**
24
+ * Array of scopes the application is requesting access to.
25
+ */
47
26
  scopes: Array<string>;
27
+ /**
28
+ * The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
29
+ */
48
30
  redirectUri: string;
49
31
  };
@@ -8,11 +8,6 @@ import { CommonClientCredentialRequest } from "./CommonClientCredentialRequest.j
8
8
 
9
9
  /**
10
10
  * ClientCredentialRequest
11
- * - scopes - Array of scopes the application is requesting access to. Typically contains only the .default scope for a single resource. See: https://learn.microsoft.com/azure/active-directory/develop/scopes-oidc#the-default-scope
12
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
13
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
14
- * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
15
- * - clientAssertion - An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow
16
11
  * @public
17
12
  */
18
13
  export type ClientCredentialRequest = Partial<
@@ -24,5 +19,8 @@ export type ClientCredentialRequest = Partial<
24
19
  | "storeInCache"
25
20
  >
26
21
  > & {
22
+ /**
23
+ * An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow
24
+ */
27
25
  clientAssertion?: string | ClientAssertionCallback;
28
26
  };
@@ -11,19 +11,21 @@ import {
11
11
 
12
12
  /**
13
13
  * CommonClientCredentialRequest
14
- * - scopes - Array of scopes the application is requesting access to.
15
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
16
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
17
- * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
18
- * - preferredAzureRegionOptions - Options of the user's preferred azure region
19
- * - clientAssertion - An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow
20
- * - azureRegion - Azure region to be used for regional authentication
21
14
  */
22
15
  export type CommonClientCredentialRequest = Omit<
23
16
  BaseAuthRequest,
24
17
  "extraQueryParameters" | "extraParameters"
25
18
  > & {
19
+ /**
20
+ * Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
21
+ */
26
22
  skipCache?: boolean;
23
+ /**
24
+ * Azure region to be used for regional authentication.
25
+ */
27
26
  azureRegion?: AzureRegion;
27
+ /**
28
+ * An assertion string or a callback function that returns an assertion string (both are Base64Url-encoded signed JWTs) used in the Client Credential flow.
29
+ */
28
30
  clientAssertion?: ClientAssertion;
29
31
  };
@@ -11,20 +11,22 @@ import {
11
11
 
12
12
  /**
13
13
  * Parameters for Oauth2 device code flow.
14
- * - scopes - Array of scopes the application is requesting access to.
15
- * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests.
16
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
17
- * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials.
18
- * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true.
19
- * - resourceRequestMethod - HTTP Request type used to request data from the resource (i.e. "GET", "POST", etc.). Used for proof-of-possession flows.
20
- * - resourceRequestUri - URI that token will be used for. Used for proof-of-possession flows.
21
- * - timeout - Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period.
22
- * - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
23
- * - extraParameters - String to string map of custom query parameters added to outgoing token service requests
24
14
  */
25
15
  export type CommonDeviceCodeRequest = BaseAuthRequest & {
16
+ /**
17
+ * Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials.
18
+ */
26
19
  deviceCodeCallback: (response: DeviceCodeResponse) => void;
20
+ /**
21
+ * Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true.
22
+ */
27
23
  cancel?: boolean;
24
+ /**
25
+ * Timeout period in seconds which the user explicitly configures for the polling of the device code endpoint. At the end of this period; assuming the device code has not expired yet; the device code polling is stopped and the request cancelled. The device code expiration window will always take precedence over this set period.
26
+ */
28
27
  timeout?: number;
28
+ /**
29
+ * String to string map of custom query parameters added to outgoing token service requests.
30
+ */
29
31
  extraQueryParameters?: StringDict;
30
32
  };
@@ -6,16 +6,18 @@
6
6
  import { BaseAuthRequest } from "@azure/msal-common/node";
7
7
 
8
8
  /**
9
- * - scopes - Array of scopes the application is requesting access to.
10
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
11
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
12
- * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
13
- * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
9
+ * CommonOnBehalfOfRequest
14
10
  */
15
11
  export type CommonOnBehalfOfRequest = Omit<
16
12
  BaseAuthRequest,
17
13
  "extraQueryParameters" | "extraParameters"
18
14
  > & {
15
+ /**
16
+ * The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
17
+ */
19
18
  oboAssertion: string;
19
+ /**
20
+ * Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
21
+ */
20
22
  skipCache?: boolean;
21
23
  };
@@ -8,17 +8,14 @@ import { BaseAuthRequest } from "@azure/msal-common/node";
8
8
  /**
9
9
  * CommonUsernamePassword parameters passed by the user to retrieve credentials
10
10
  * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing.
11
- *
12
- * - scopes - Array of scopes the application is requesting access to.
13
- * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
14
- * - authority - Url of the authority which the application acquires tokens from.
15
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
16
- * - username - username of the client
17
- * - password - credentials
18
- * - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
19
- * - extraParameters - String to string map of custom query parameters added to outgoing token service requests
20
11
  */
21
12
  export type CommonUsernamePasswordRequest = BaseAuthRequest & {
13
+ /**
14
+ * Username of the client
15
+ */
22
16
  username: string;
17
+ /**
18
+ * Credentials
19
+ */
23
20
  password: string;
24
21
  };
@@ -8,12 +8,6 @@ import { CommonDeviceCodeRequest } from "./CommonDeviceCodeRequest.js";
8
8
 
9
9
  /**
10
10
  * Parameters for Oauth2 device code flow.
11
- * - scopes - Array of scopes the application is requesting access to.
12
- * - authority: - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. If authority is set on client application object, this will override that value. Overriding the value will cause for authority validation to happen each time. If the same authority will be used for all request, set on the application object instead of the requests.
13
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
14
- * - deviceCodeCallback - Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials.
15
- * - cancel - Boolean to cancel polling of device code endpoint. While the user authenticates on a separate device, MSAL polls the the token endpoint of security token service for the interval specified in the device code response (usually 15 minutes). To stop polling and cancel the request, set cancel=true.
16
- * - extraQueryParameters - String to string map of custom query parameters added to the query string
17
11
  * @public
18
12
  */
19
13
  export type DeviceCodeRequest = Partial<
@@ -26,6 +20,12 @@ export type DeviceCodeRequest = Partial<
26
20
  | "storeInCache"
27
21
  >
28
22
  > & {
23
+ /**
24
+ * Array of scopes the application is requesting access to.
25
+ */
29
26
  scopes: Array<string>;
27
+ /**
28
+ * Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri, input the user_code, and input credentials.
29
+ */
30
30
  deviceCodeCallback: (response: DeviceCodeResponse) => void;
31
31
  };
@@ -8,22 +8,33 @@ import { ILoopbackClient } from "../network/ILoopbackClient.js";
8
8
 
9
9
  /**
10
10
  * Request object passed by user to configure acquireTokenInteractive API
11
- *
12
- * - openBrowser - Function to open a browser instance on user's system.
13
- * - scopes - Array of scopes the application is requesting access to.
14
- * - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition.
15
- * - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure.
16
- * - windowHandle - Used in native broker flows to properly parent the native broker window
17
- * - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
18
11
  * @public
19
12
  */
20
13
  export type InteractiveRequest = Partial<
21
14
  Omit<CommonAuthorizationUrlRequest, "scopes" | "storeInCache">
22
15
  > & {
16
+ /**
17
+ * Function to open a browser instance on user's system.
18
+ */
23
19
  openBrowser: (url: string) => Promise<void>;
20
+ /**
21
+ * Array of scopes the application is requesting access to.
22
+ */
24
23
  scopes?: Array<string>;
24
+ /**
25
+ * Template to be displayed on the opened browser instance upon successful token acquisition.
26
+ */
25
27
  successTemplate?: string;
28
+ /**
29
+ * Template to be displayed on the opened browser instance upon token acquisition failure.
30
+ */
26
31
  errorTemplate?: string;
32
+ /**
33
+ * Used in native broker flows to properly parent the native broker window
34
+ */
27
35
  windowHandle?: Buffer; // Relevant only to brokered requests
36
+ /**
37
+ * Custom implementation for a loopback server to listen for authorization code response.
38
+ */
28
39
  loopbackClient?: ILoopbackClient;
29
40
  };
@@ -8,11 +8,15 @@ import { ManagedIdentityRequestParams } from "./ManagedIdentityRequestParams.js"
8
8
 
9
9
  /**
10
10
  * ManagedIdentityRequest
11
- * - clientCapabilities - an array of capabilities to be added to all network requests as part of the `xms_cc` claim
12
- * - revokedTokenSha256Hash - a SHA256 hash of the token that was revoked. The managed identity will revoke the token based on the SHA256 hash of the token, not the token itself. This is to prevent the token from being leaked in transit.
13
11
  */
14
12
  export type ManagedIdentityRequest = ManagedIdentityRequestParams &
15
13
  CommonClientCredentialRequest & {
14
+ /**
15
+ * An array of capabilities to be added to all network requests as part of the `xms_cc` claim
16
+ */
16
17
  clientCapabilities?: Array<string>;
18
+ /**
19
+ * A SHA256 hash of the token that was revoked. The managed identity will revoke the token based on the SHA256 hash of the token, not the token itself. This is to prevent the token from being leaked in transit.
20
+ */
17
21
  revokedTokenSha256Hash?: string;
18
22
  };
@@ -5,13 +5,19 @@
5
5
 
6
6
  /**
7
7
  * ManagedIdentityRequest
8
- * - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped
9
- * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true
10
- * - resource - resource requested to access the protected API. It should be of the form "ResourceIdUri" or "ResourceIdUri/.default". For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default
11
8
  * @public
12
9
  */
13
10
  export type ManagedIdentityRequestParams = {
11
+ /**
12
+ * A stringified claims request which will be used to determine whether or not the cache should be skipped
13
+ */
14
14
  claims?: string;
15
+ /**
16
+ * Forces managed identity requests to skip the cache and make network calls if true
17
+ */
15
18
  forceRefresh?: boolean;
19
+ /**
20
+ * Resource requested to access the protected API. It should be of the form "ResourceIdUri" or "ResourceIdUri/.default". For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default
21
+ */
16
22
  resource: string;
17
23
  };
@@ -6,11 +6,7 @@
6
6
  import { CommonOnBehalfOfRequest } from "./CommonOnBehalfOfRequest.js";
7
7
 
8
8
  /**
9
- * - scopes - Array of scopes the application is requesting access to.
10
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
11
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
12
- * - oboAssertion - The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
13
- * - skipCache - Skip token cache lookup and force request to authority to get a a new token. Defaults to false.
9
+ * OnBehalfOfRequest
14
10
  * @public
15
11
  */
16
12
  export type OnBehalfOfRequest = Partial<
@@ -23,6 +19,12 @@ export type OnBehalfOfRequest = Partial<
23
19
  | "storeInCache"
24
20
  >
25
21
  > & {
22
+ /**
23
+ * The access token that was sent to the middle-tier API. This token must have an audience of the app making this OBO request.
24
+ */
26
25
  oboAssertion: string;
26
+ /**
27
+ * Array of scopes the application is requesting access to.
28
+ */
27
29
  scopes: Array<string>;
28
30
  };
@@ -7,14 +7,6 @@ import { CommonRefreshTokenRequest } from "@azure/msal-common/node";
7
7
 
8
8
  /**
9
9
  * CommonRefreshTokenRequest
10
- * - scopes - Array of scopes the application is requesting access to.
11
- * - claims - A stringified claims request which will be added to all /authorize and /token calls
12
- * - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
13
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
14
- * - refreshToken - A refresh token returned from a previous request to the Identity provider.
15
- * - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
16
- * - extraParameters - String to string map of custom query parameters added to outgoing token service requests
17
- * - forceCache - Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
18
10
  * @public
19
11
  */
20
12
  export type RefreshTokenRequest = Partial<
@@ -28,7 +20,16 @@ export type RefreshTokenRequest = Partial<
28
20
  | "storeInCache"
29
21
  >
30
22
  > & {
23
+ /**
24
+ * Array of scopes the application is requesting access to.
25
+ */
31
26
  scopes: Array<string>;
27
+ /**
28
+ * A refresh token returned from a previous request to the Identity provider.
29
+ */
32
30
  refreshToken: string;
31
+ /**
32
+ * Force MSAL to cache a refresh token flow response when there is no account in the cache. Used for migration scenarios.
33
+ */
33
34
  forceCache?: boolean;
34
35
  };
@@ -7,19 +7,17 @@ import { AccountInfo, CommonSilentFlowRequest } from "@azure/msal-common/node";
7
7
 
8
8
  /**
9
9
  * SilentFlow parameters passed by the user to retrieve credentials silently
10
- * - scopes - Array of scopes the application is requesting access to.
11
- * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
12
- * - authority - Url of the authority which the application acquires tokens from.
13
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
14
- * - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
15
- * - extraParameters - String to string map of custom query parameters added to outgoing token service requests
16
- * - account - Account entity to lookup the credentials.
17
- * - forceRefresh - Forces silent requests to make network calls if true.
18
10
  * @public
19
11
  */
20
12
  export type SilentFlowRequest = Partial<
21
13
  Omit<CommonSilentFlowRequest, "account" | "scopes" | "storeInCache">
22
14
  > & {
15
+ /**
16
+ * Account entity to lookup the credentials.
17
+ */
23
18
  account: AccountInfo;
19
+ /**
20
+ * Array of scopes the application is requesting access to.
21
+ */
24
22
  scopes: Array<string>;
25
23
  };
@@ -8,15 +8,6 @@ import { CommonUsernamePasswordRequest } from "./CommonUsernamePasswordRequest.j
8
8
  /**
9
9
  * UsernamePassword parameters passed by the user to retrieve credentials
10
10
  * Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing.
11
- *
12
- * - scopes - Array of scopes the application is requesting access to.
13
- * - claims - A stringified claims request which will be added to all /authorize and /token calls. When included on a silent request, cache lookup will be skipped and token will be refreshed.
14
- * - authority - Url of the authority which the application acquires tokens from.
15
- * - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
16
- * - username - username of the client
17
- * - password - credentials
18
- * - extraQueryParameters - String to string map of custom query parameters added to outgoing token service requests
19
- * - extraParameters - String to string map of custom query parameters added to outgoing token service requests
20
11
  * @public
21
12
  */
22
13
  export type UsernamePasswordRequest = Partial<
@@ -30,7 +21,16 @@ export type UsernamePasswordRequest = Partial<
30
21
  | "storeInCache"
31
22
  >
32
23
  > & {
24
+ /**
25
+ * Array of scopes the application is requesting access to.
26
+ */
33
27
  scopes: Array<string>;
28
+ /**
29
+ * Username of the client
30
+ */
34
31
  username: string;
32
+ /**
33
+ * Credentials
34
+ */
35
35
  password: string;
36
36
  };