You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use the configuration object to configure MSAL Modules and initialize the base interfaces for MSAL.
20
20
*
21
21
* This object allows you to configure important elements of MSAL functionality:
22
-
* - logger: logging for application
23
-
* - storage: this is where you configure storage implementation.
24
-
* - network: this is where you can configure network implementation.
25
-
* - crypto: implementation of crypto functions
22
+
* - authOptions - Authentication for application
23
+
* - cryptoInterface - Implementation of crypto functions
24
+
* - libraryInfo - Library metadata
25
+
* - loggerOptions - Logging for application
26
+
* - networkInterface - Network implementation
27
+
* - storageInterface - Storage implementation
28
+
* - systemOptions - Additional library options
26
29
*/
27
30
exporttypeClientConfiguration={
28
31
authOptions: AuthOptions,
@@ -35,10 +38,12 @@ export type ClientConfiguration = {
35
38
};
36
39
37
40
/**
38
-
* @type AuthOptions: Use this to configure the auth options in the Configuration object
41
+
* Use this to configure the auth options in the Configuration object
39
42
*
40
-
* - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform
41
-
* - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
43
+
* - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform
44
+
* - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
45
+
* - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.
46
+
* - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.
42
47
*/
43
48
exporttypeAuthOptions={
44
49
clientId: string;
@@ -48,10 +53,10 @@ export type AuthOptions = {
48
53
};
49
54
50
55
/**
51
-
* Telemetry Config Options
56
+
* Use this to configure the telemetry options in the Configuration object
57
+
*
52
58
* - applicationName - Name of the consuming apps application
53
59
* - applicationVersion - Version of the consuming application
54
-
* - telemetryEmitter - Function where telemetry events are flushed to
55
60
*/
56
61
exporttypeTelemetryOptions={
57
62
applicationName: string;
@@ -60,9 +65,9 @@ export type TelemetryOptions = {
60
65
};
61
66
62
67
/**
63
-
* Library Specific Options
68
+
* Use this to configure token renewal and telemetry info in the Configuration object
64
69
*
65
-
* - tokenRenewalOffsetSeconds - sets the window of offset needed to renew the token before expiry
70
+
* - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry
66
71
* - telemetry - Telemetry options for library network requests
67
72
*/
68
73
exporttypeSystemOptions={
@@ -71,7 +76,11 @@ export type SystemOptions = {
71
76
};
72
77
73
78
/**
74
-
* Logger options to configure the logging that MSAL does.
79
+
* Use this to configure the logging that MSAL does, by configuring logger options in the Configuration object
80
+
*
81
+
* - loggerCallback - Callback for logger
82
+
* - piiLoggingEnabled - Sets whether pii logging is enabled
83
+
* - logLevel - Sets the level at which logging happens
Copy file name to clipboardExpand all lines: lib/msal-common/src/request/AuthorizationCodeRequest.ts
+8-22
Original file line number
Diff line number
Diff line change
@@ -6,28 +6,14 @@
6
6
import{BaseAuthRequest}from"./BaseAuthRequest";
7
7
8
8
/**
9
-
* @type AuthorizationCodeRequest: Request object passed by user to acquire a token from the server exchanging a valid authorization code
10
-
* (second leg of OAuth2.0 Authorization Code flow)
11
-
*
12
-
* scopes: A space-separated array of scopes for the same resource.
13
-
*
14
-
*
15
-
* authority: URL of the authority, the security token service (STS) from which MSAL will acquire tokens.
16
-
* If authority is set on client application object, this will override that value. Overriding
17
-
* the value will cause for authority validation to happen each time. If the same authority
18
-
* will be used for all request, set on the application object instead of the requests.
19
-
*
20
-
* redirectUri: The redirect URI of your app, where the authority will redirect to after the user inputs credentials
21
-
* and consents. It must exactly match one of the redirect URIs you registered in the portal.
22
-
*
23
-
* code: The authorization_code that the user acquired in the first leg of the flow.
24
-
*
25
-
* codeVerifier: The same code_verifier that was used to obtain the authorization_code.
26
-
* Required if PKCE was used in the authorization code grant request.
27
-
* For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636
28
-
*
29
-
* correlationId: Unique GUID set per request to trace a request end-to-end for telemetry purposes
30
-
*
9
+
* Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow)
10
+
*
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
+
* - redirectUri - The redirect URI of your app, where the authority will redirect to after the user inputs credentials and consents. It must exactly match one of the redirect URIs you registered in the portal.
15
+
* - code - The authorization_code that the user acquired in the first leg of the flow.
16
+
* - codeVerifier - The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.For more information, see the PKCE RFC: https://tools.ietf.org/html/rfc7636
Copy file name to clipboardExpand all lines: lib/msal-common/src/request/AuthorizationUrlRequest.ts
+21-72
Original file line number
Diff line number
Diff line change
@@ -8,90 +8,39 @@ import { StringDict } from "../utils/MsalTypes";
8
8
import{BaseAuthRequest}from"./BaseAuthRequest";
9
9
10
10
/**
11
-
* @type AuthorizationCodeUrlRequest: Request object passed by user to retrieve a Code from the
12
-
* server (first leg of authorization code grant flow)
11
+
* Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow)
12
+
*
13
+
* - scopes - Array of scopes the application is requesting access to.
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
+
* - 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.
17
+
* - extraScopesToConsent - Scopes for a different resource when the user needs consent upfront.
18
+
* - 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.
19
+
* - 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
20
+
* - 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
21
+
* - 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.
22
+
* - prompt - Indicates the type of user interaction that is required.
23
+
* login: will force the user to enter their credentials on that request, negating single-sign on
24
+
* 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
25
+
* consent: will the trigger the OAuth consent dialog after the user signs in, asking the user to grant permissions to the app
26
+
* 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
27
+
* - 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.
28
+
* - 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.
29
+
* - extraQueryParameters - String to string map of custom query parameters.
30
+
* - claims - In cases where Azure AD tenant admin has enabled conditional access policies, and the policy has not been met, exceptions will contain claims that need to be consented to.
31
+
* - 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.
Copy file name to clipboardExpand all lines: lib/msal-common/src/request/BaseAuthRequest.ts
+6-13
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,14 @@
3
3
* Licensed under the MIT License.
4
4
*/
5
5
6
+
/**
7
+
* BaseAuthRequest
8
+
* - scopes - Array of scopes the application is requesting access to.
9
+
* - authority - URL of the authority, the security token service (STS) from which MSAL will acquire tokens. Defaults to https://login.microsoftonline.com/common. If using the same authority for all request, authority should set on client application object and not request, to avoid resolving authority endpoints multiple times.
10
+
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
11
+
*/
6
12
exporttypeBaseAuthRequest={
7
-
/**
8
-
* Scopes the application is requesting access to.
9
-
*/
10
13
scopes: Array<string>;
11
-
12
-
/**
13
-
* Url of the authority which the application acquires tokens from. Defaults to
14
-
* https://login.microsoftonline.com/common. If using the same authority for all request, authority should set
15
-
* on client application object and not request, to avoid resolving authority endpoints multiple times.
16
-
*/
17
14
authority?: string;
18
-
19
-
/**
20
-
* Unique GUID set per request to trace a request end-to-end for telemetry purposes
Copy file name to clipboardExpand all lines: lib/msal-common/src/request/DeviceCodeRequest.ts
+5-12
Original file line number
Diff line number
Diff line change
@@ -8,20 +8,13 @@ import { BaseAuthRequest } from "./BaseAuthRequest";
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.
11
16
*/
12
17
exporttypeDeviceCodeRequest=BaseAuthRequest&{
13
-
14
-
/**
15
-
* Callback containing device code response. Message should be shown to end user. End user can then navigate to the verification_uri,
0 commit comments