UNPKG

4.09 kBTypeScriptView Raw
1import { Authority } from "./authority/Authority";
2import { AuthenticationParameters } from "./AuthenticationParameters";
3import { StringDict } from "./MsalTypes";
4import { Account } from "./Account";
5/**
6 * Nonce: OIDC Nonce definition: https://openid.net/specs/openid-connect-core-1_0.html#IDToken
7 * State: OAuth Spec: https://tools.ietf.org/html/rfc6749#section-10.12
8 * @hidden
9 */
10export declare class ServerRequestParameters {
11 authorityInstance: Authority;
12 clientId: string;
13 scopes: Array<string>;
14 nonce: string;
15 state: string;
16 xClientVer: string;
17 xClientSku: string;
18 correlationId: string;
19 responseType: string;
20 redirectUri: string;
21 promptValue: string;
22 claimsValue: string;
23 queryParameters: string;
24 extraQueryParameters: string;
25 get authority(): string;
26 /**
27 * Constructor
28 * @param authority
29 * @param clientId
30 * @param scope
31 * @param responseType
32 * @param redirectUri
33 * @param state
34 */
35 constructor(authority: Authority, clientId: string, responseType: string, redirectUri: string, scopes: Array<string>, state: string, correlationId: string);
36 /**
37 * @hidden
38 * @ignore
39 *
40 * Utility to populate QueryParameters and ExtraQueryParameters to ServerRequestParamerers
41 * @param request
42 * @param serverAuthenticationRequest
43 */
44 populateQueryParams(account: Account, request: AuthenticationParameters | null, adalIdTokenObject?: object, silentCall?: boolean): void;
45 /**
46 * Constructs extraQueryParameters to be sent to the server for the AuthenticationParameters set by the developer
47 * in any login() or acquireToken() calls
48 * @param idTokenObject
49 * @param extraQueryParameters
50 * @param sid
51 * @param loginHint
52 */
53 private constructUnifiedCacheQueryParameter;
54 /**
55 * @hidden
56 *
57 * Adds login_hint to authorization URL which is used to pre-fill the username field of sign in page for the user if known ahead of time
58 * domain_hint if added skips the email based discovery process of the user - only supported for interactive calls in implicit_flow
59 * domain_req utid received as part of the clientInfo
60 * login_req uid received as part of clientInfo
61 * Also does a sanity check for extraQueryParameters passed by the user to ensure no repeat queryParameters
62 *
63 * @param {@link Account} account - Account for which the token is requested
64 * @param queryparams
65 * @param {@link ServerRequestParameters}
66 * @ignore
67 */
68 private addHintParameters;
69 /**
70 * Add SID to extraQueryParameters
71 * @param sid
72 */
73 private addSSOParameter;
74 /**
75 * Utility to generate a QueryParameterString from a Key-Value mapping of extraQueryParameters passed
76 * @param extraQueryParameters
77 */
78 static generateQueryParametersString(queryParameters?: StringDict, silentCall?: boolean): string | null;
79 /**
80 * Check to see if there are SSO params set in the Request
81 * @param request
82 */
83 static isSSOParam(request: AuthenticationParameters): boolean;
84 /**
85 * Returns the correct response_type string attribute for an acquireToken request configuration
86 * @param accountsMatch boolean: Determines whether the account in the request matches the cached account
87 * @param scopes Array<string>: AuthenticationRequest scopes configuration
88 * @param loginScopesOnly boolean: True if the scopes array ONLY contains the clientId or any combination of OIDC scopes, without resource scopes
89 */
90 static determineResponseType(accountsMatch: boolean, scopes: Array<string>): string;
91 /**
92 * Returns the correct response_type string attribute for an acquireToken request configuration that contains an
93 * account that matches the account in the MSAL cache.
94 * @param scopes Array<string>: AuthenticationRequest scopes configuration
95 */
96 private static responseTypeForMatchingAccounts;
97}