-
Notifications
You must be signed in to change notification settings - Fork 217
/
Constants.cs
161 lines (135 loc) · 6.33 KB
/
Constants.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.Identity.Web
{
/// <summary>
/// General constants for Microsoft Identity Web.
/// </summary>
public static class Constants
{
/// <summary>
/// LoginHint.
/// Represents the preferred_username claim in the ID token.
/// </summary>
public const string LoginHint = "login_hint";
/// <summary>
/// DomainHint.
/// Determined by the tenant Id.
/// </summary>
public const string DomainHint = "domain_hint";
/// <summary>
/// Claims.
/// Determined from the signed-in user.
/// </summary>
public const string Claims = "claims";
/// <summary>
/// Bearer.
/// Predominant type of access token used with OAuth 2.0.
/// </summary>
public const string Bearer = "Bearer";
/// <summary>
/// AzureAd.
/// Configuration section name for AzureAd.
/// </summary>
public const string AzureAd = "AzureAd";
/// <summary>
/// AzureAdB2C.
/// Configuration section name for AzureAdB2C.
/// </summary>
public const string AzureAdB2C = "AzureAdB2C";
/// <summary>
/// Scope.
/// </summary>
public const string Scope = "scope";
/// <summary>
/// Policy for B2C user flows.
/// The name of the policy to check against a specific user flow.
/// </summary>
public const string Policy = "policy";
/// <summary>
/// SpaAuthCode.
/// Key to retreive SpaAuthCode from the HttpContext.
/// </summary>
public const string SpaAuthCode = "SpaAuthCode";
/// <summary>
/// Defaults which is the value used by Microsoft.Identity.Web.UI.
/// </summary>
public const string ResetPasswordPath = "/MicrosoftIdentity/Account/ResetPassword";
/// <summary>
/// Defaults to the value used by Microsoft.Identity.Web.UI.
/// </summary>
public const string ErrorPath = "/MicrosoftIdentity/Account/Error";
/// <summary>
/// Used to convey the original location of the user before
/// the remote challenge was triggered up to the access denied page.
/// </summary>
public const string ReturnUrl = "ReturnUrl";
// IssuerMetadata
internal const string TenantDiscoveryEndpoint = "tenant_discovery_endpoint";
internal const string ApiVersion = "api-version";
internal const string Metadata = "metadata";
// Metadata
internal const string PreferredNetwork = "preferred_network";
internal const string PreferredCache = "preferred_cache";
internal const string Aliases = "aliases";
// AadIssuerValidator
#pragma warning disable S1075 // URIs should not be hardcoded
internal const string AzureADIssuerMetadataUrl = "https://login.microsoftonline.com/common/discovery/instance?authorization_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/authorize&api-version=1.1";
#pragma warning restore S1075 // URIs should not be hardcoded
internal const string FallbackAuthority = "https://login.microsoftonline.com/";
internal const string OidcEndpoint = "/.well-known/openid-configuration";
// RegisterValidAudience
internal const string Version = "ver";
internal const string V1 = "1.0";
internal const string V2 = "2.0";
// ClaimsPrincipalExtension
internal const string MsaTenantId = "9188040d-6c67-4c5b-b112-36a304b66dad";
internal const string Consumers = "consumers";
internal const string Organizations = "organizations";
internal const string Common = "common";
// ClientInfo
internal const string ClientInfo = "client_info";
internal const string One = "1";
// Certificates
internal const string MediaTypePksc12 = "application/x-pkcs12";
internal const string PersonalUserCertificateStorePath = "CurrentUser/My";
// Miscellaneous
internal const string UserAgent = "User-Agent";
internal const string JwtSecurityTokenUsedToCallWebApi = "JwtSecurityTokenUsedToCallWebAPI";
internal const string PreferredUserName = "preferred_username";
internal const string NameClaim = "name";
internal const string Consent = "consent";
internal const string ConsentUrl = "consentUri";
internal const string Scopes = "scopes";
internal const string ProposedAction = "proposedAction";
internal const string Authorization = "Authorization";
internal const string ApplicationJson = "application/json";
internal const string ISessionStore = "ISessionStore";
internal const string True = "True";
internal const string InvalidClient = "invalid_client";
internal const string InvalidKeyError = "AADSTS700027";
internal const string SignedAssertionInvalidTimeRange = "AADSTS700024";
internal const string CiamAuthoritySuffix = ".ciamlogin.com";
internal const string TestSlice = "dc";
// Blazor challenge URI
internal const string BlazorChallengeUri = "MicrosoftIdentity/Account/Challenge?redirectUri=";
// Microsoft Graph
internal const string UserReadScope = "user.read";
internal const string GraphBaseUrlV1 = "https://graph.microsoft.com/v1.0";
internal const string DefaultGraphScope = "https://graph.microsoft.com/.default";
// Telemetry headers
internal const string TelemetryHeaderKey = "x-client-brkrver";
internal const string IDWebSku = "IDWeb.";
// Authorize for scopes attributes
internal const string XReturnUrl = "x-ReturnUrl";
internal const string XRequestedWith = "X-Requested-With";
internal const string XmlHttpRequest = "XMLHttpRequest";
internal const string RequiredScopesSetting = "@setting";
// AccountController.Challenge parameters
internal const string LoginHintParameter = "loginHint";
internal const string DomainHintParameter = "domainHint";
// Backup authentication system
internal const string XAnchorMailbox = "x-anchormailbox";
internal const string Upn = "upn";
}
}