UNPKG

4.42 kBTypeScriptView Raw
1/**
2 * @hidden
3 * Constants
4 */
5export declare class Constants {
6 static get libraryName(): string;
7 static get claims(): string;
8 static get clientId(): string;
9 static get adalIdToken(): string;
10 static get cachePrefix(): string;
11 static get scopes(): string;
12 static get no_account(): string;
13 static get upn(): string;
14 static get domain_hint(): string;
15 static get prompt_select_account(): string;
16 static get prompt_none(): string;
17 static get prompt(): string;
18 static get response_mode_fragment(): string;
19 static get resourceDelimiter(): string;
20 static get cacheDelimiter(): string;
21 private static _popUpWidth;
22 static get popUpWidth(): number;
23 static set popUpWidth(width: number);
24 private static _popUpHeight;
25 static get popUpHeight(): number;
26 static set popUpHeight(height: number);
27 static get login(): string;
28 static get renewToken(): string;
29 static get unknown(): string;
30 static get ADFS(): string;
31 static get homeAccountIdentifier(): string;
32 static get common(): string;
33 static get openidScope(): string;
34 static get profileScope(): string;
35 static get oidcScopes(): Array<string>;
36 static get interactionTypeRedirect(): InteractionType;
37 static get interactionTypePopup(): InteractionType;
38 static get interactionTypeSilent(): InteractionType;
39 static get inProgress(): string;
40}
41export declare const SESSION_STORAGE = "sessionStorage";
42/**
43 * Keys in the hashParams
44 */
45export declare enum ServerHashParamKeys {
46 SCOPE = "scope",
47 STATE = "state",
48 ERROR = "error",
49 ERROR_DESCRIPTION = "error_description",
50 ACCESS_TOKEN = "access_token",
51 ID_TOKEN = "id_token",
52 EXPIRES_IN = "expires_in",
53 SESSION_STATE = "session_state",
54 CLIENT_INFO = "client_info"
55}
56/**
57 * @hidden
58 * @ignore
59 * response_type from OpenIDConnect
60 * References: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html & https://tools.ietf.org/html/rfc6749#section-4.2.1
61 *
62 */
63export declare const ResponseTypes: {
64 id_token: string;
65 token: string;
66 id_token_token: string;
67};
68/**
69 * @hidden
70 * CacheKeys for MSAL
71 */
72export declare enum TemporaryCacheKeys {
73 AUTHORITY = "authority",
74 ACQUIRE_TOKEN_ACCOUNT = "acquireTokenAccount",
75 SESSION_STATE = "session.state",
76 STATE_LOGIN = "state.login",
77 STATE_ACQ_TOKEN = "state.acquireToken",
78 STATE_RENEW = "state.renew",
79 NONCE_IDTOKEN = "nonce.idtoken",
80 LOGIN_REQUEST = "login.request",
81 RENEW_STATUS = "token.renew.status",
82 URL_HASH = "urlHash",
83 INTERACTION_STATUS = "interaction.status",
84 REDIRECT_REQUEST = "redirect_request"
85}
86export declare enum PersistentCacheKeys {
87 IDTOKEN = "idtoken",
88 CLIENT_INFO = "client.info"
89}
90export declare enum ErrorCacheKeys {
91 LOGIN_ERROR = "login.error",
92 ERROR = "error",
93 ERROR_DESC = "error.description"
94}
95export declare const DEFAULT_AUTHORITY: string;
96export declare const AAD_INSTANCE_DISCOVERY_ENDPOINT: string;
97export declare const WELL_KNOWN_SUFFIX: string;
98/**
99 * @hidden
100 * SSO Types - generated to populate hints
101 */
102export declare enum SSOTypes {
103 ACCOUNT = "account",
104 SID = "sid",
105 LOGIN_HINT = "login_hint",
106 ORGANIZATIONS = "organizations",
107 CONSUMERS = "consumers",
108 ID_TOKEN = "id_token",
109 ACCOUNT_ID = "accountIdentifier",
110 HOMEACCOUNT_ID = "homeAccountIdentifier"
111}
112/**
113 * @hidden
114 */
115export declare const DisallowedEQParams: SSOTypes[];
116export declare type InteractionType = "redirectInteraction" | "popupInteraction" | "silentInteraction";
117export declare const NetworkRequestType: {
118 GET: string;
119 POST: string;
120};
121/**
122 * we considered making this "enum" in the request instead of string, however it looks like the allowed list of
123 * prompt values kept changing over past couple of years. There are some undocumented prompt values for some
124 * internal partners too, hence the choice of generic "string" type instead of the "enum"
125 * @hidden
126 */
127export declare const PromptState: {
128 LOGIN: string;
129 SELECT_ACCOUNT: string;
130 CONSENT: string;
131 NONE: string;
132};
133/**
134 * Frame name prefixes for the hidden iframe created in silent frames
135 */
136export declare const FramePrefix: {
137 ID_TOKEN_FRAME: string;
138 TOKEN_FRAME: string;
139};