76 references to IdentityConstants
Microsoft.AspNetCore.Identity (67)
IdentityApiEndpointRouteBuilderExtensions.cs (4)
97
signInManager.AuthenticationScheme = useCookieScheme ?
IdentityConstants
.ApplicationScheme :
IdentityConstants
.BearerScheme;
126
var refreshTokenProtector = bearerTokenOptions.Get(
IdentityConstants
.BearerScheme).RefreshTokenProtector;
139
return TypedResults.SignIn(newPrincipal, authenticationScheme:
IdentityConstants
.BearerScheme);
IdentityCookiesBuilderExtensions.cs (11)
49
builder.AddCookie(
IdentityConstants
.ApplicationScheme, o =>
57
return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services,
IdentityConstants
.ApplicationScheme);
67
builder.AddCookie(
IdentityConstants
.ExternalScheme, o =>
69
o.Cookie.Name =
IdentityConstants
.ExternalScheme;
72
return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services,
IdentityConstants
.ExternalScheme);
82
builder.AddCookie(
IdentityConstants
.TwoFactorRememberMeScheme, o =>
84
o.Cookie.Name =
IdentityConstants
.TwoFactorRememberMeScheme;
90
return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services,
IdentityConstants
.TwoFactorRememberMeScheme);
100
builder.AddCookie(
IdentityConstants
.TwoFactorUserIdScheme, o =>
102
o.Cookie.Name =
IdentityConstants
.TwoFactorUserIdScheme;
109
return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services,
IdentityConstants
.TwoFactorUserIdScheme);
IdentityServiceCollectionExtensions.cs (19)
55
options.DefaultAuthenticateScheme =
IdentityConstants
.ApplicationScheme;
56
options.DefaultChallengeScheme =
IdentityConstants
.ApplicationScheme;
57
options.DefaultSignInScheme =
IdentityConstants
.ExternalScheme;
59
.AddCookie(
IdentityConstants
.ApplicationScheme, o =>
67
.AddCookie(
IdentityConstants
.ExternalScheme, o =>
69
o.Cookie.Name =
IdentityConstants
.ExternalScheme;
72
.AddCookie(
IdentityConstants
.TwoFactorRememberMeScheme, o =>
74
o.Cookie.Name =
IdentityConstants
.TwoFactorRememberMeScheme;
80
.AddCookie(
IdentityConstants
.TwoFactorUserIdScheme, o =>
82
o.Cookie.Name =
IdentityConstants
.TwoFactorUserIdScheme;
144
.AddAuthentication(
IdentityConstants
.BearerAndApplicationScheme)
145
.AddScheme<AuthenticationSchemeOptions, CompositeIdentityHandler>(
IdentityConstants
.BearerAndApplicationScheme, null, compositeOptions =>
147
compositeOptions.ForwardDefault =
IdentityConstants
.BearerScheme;
148
compositeOptions.ForwardAuthenticate =
IdentityConstants
.BearerAndApplicationScheme;
150
.AddBearerToken(
IdentityConstants
.BearerScheme)
164
=> services.Configure(
IdentityConstants
.ApplicationScheme, configure);
173
=> services.Configure(
IdentityConstants
.ExternalScheme, configure);
212
var bearerResult = await Context.AuthenticateAsync(
IdentityConstants
.BearerScheme);
221
return await Context.AuthenticateAsync(
IdentityConstants
.ApplicationScheme);
SecurityStampValidator.cs (4)
162
if (await schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorRememberMeScheme) != null)
164
await SignInManager.Context.SignOutAsync(
IdentityConstants
.TwoFactorRememberMeScheme);
187
/// Used to validate the <see cref="
IdentityConstants
.TwoFactorUserIdScheme"/> and
188
/// <see cref="
IdentityConstants
.TwoFactorRememberMeScheme"/> cookies against the user's
SignInManager.cs (29)
99
/// The authentication scheme to sign in with. Defaults to <see cref="
IdentityConstants
.ApplicationScheme"/>.
101
public string AuthenticationScheme { get; set; } =
IdentityConstants
.ApplicationScheme;
317
if (await _schemes.GetSchemeAsync(
IdentityConstants
.ExternalScheme) != null)
319
await Context.SignOutAsync(
IdentityConstants
.ExternalScheme);
321
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorUserIdScheme) != null)
323
await Context.SignOutAsync(
IdentityConstants
.TwoFactorUserIdScheme);
722
var claimsIdentity = new ClaimsIdentity(
IdentityConstants
.TwoFactorUserIdScheme);
724
await Context.SignInAsync(
IdentityConstants
.TwoFactorUserIdScheme, claimsPrincipal, props);
733
var result = await Context.AuthenticateAsync(
IdentityConstants
.TwoFactorUserIdScheme);
734
await Context.SignOutAsync(
IdentityConstants
.TwoFactorUserIdScheme);
766
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorRememberMeScheme) == null)
772
var result = await Context.AuthenticateAsync(
IdentityConstants
.TwoFactorRememberMeScheme);
787
await Context.SignInAsync(
IdentityConstants
.TwoFactorRememberMeScheme,
790
_metrics?.RememberTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme);
794
_metrics?.RememberTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme, ex);
807
await Context.SignOutAsync(
IdentityConstants
.TwoFactorRememberMeScheme);
808
_metrics?.ForgetTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme);
812
_metrics?.ForgetTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme, ex);
878
if (await _schemes.GetSchemeAsync(
IdentityConstants
.ExternalScheme) != null)
880
await Context.SignOutAsync(
IdentityConstants
.ExternalScheme);
883
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorUserIdScheme) != null)
885
await Context.SignOutAsync(
IdentityConstants
.TwoFactorUserIdScheme);
1110
var auth = await Context.AuthenticateAsync(
IdentityConstants
.ExternalScheme);
1197
var identity = new ClaimsIdentity(
IdentityConstants
.TwoFactorUserIdScheme);
1209
var rememberBrowserIdentity = new ClaimsIdentity(
IdentityConstants
.TwoFactorRememberMeScheme);
1254
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorUserIdScheme) != null)
1258
await Context.SignInAsync(
IdentityConstants
.TwoFactorUserIdScheme, StoreTwoFactorInfo(userId, loginProvider));
1267
await Context.SignOutAsync(
IdentityConstants
.ExternalScheme);
1287
var result = await Context.AuthenticateAsync(
IdentityConstants
.TwoFactorUserIdScheme);
Microsoft.AspNetCore.Identity.UI (9)
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (1)
113
await HttpContext.SignOutAsync(
IdentityConstants
.ExternalScheme);
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (2)
130
await HttpContext.SignOutAsync(
IdentityConstants
.ExternalScheme);
161
await HttpContext.SignOutAsync(
IdentityConstants
.ExternalScheme);
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (1)
113
await HttpContext.SignOutAsync(
IdentityConstants
.ExternalScheme);
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (2)
130
await HttpContext.SignOutAsync(
IdentityConstants
.ExternalScheme);
161
await HttpContext.SignOutAsync(
IdentityConstants
.ExternalScheme);
IdentityDefaultUIConfigureOptions.cs (1)
53
if (string.Equals(
IdentityConstants
.ApplicationScheme, name, StringComparison.Ordinal))
IdentityServiceCollectionUIExtensions.cs (2)
43
o.DefaultScheme =
IdentityConstants
.ApplicationScheme;
44
o.DefaultSignInScheme =
IdentityConstants
.ExternalScheme;