66 references to IdentityConstants
Microsoft.AspNetCore.Identity (66)
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;
143
.AddAuthentication(
IdentityConstants
.BearerAndApplicationScheme)
144
.AddScheme<AuthenticationSchemeOptions, CompositeIdentityHandler>(
IdentityConstants
.BearerAndApplicationScheme, null, compositeOptions =>
146
compositeOptions.ForwardDefault =
IdentityConstants
.BearerScheme;
147
compositeOptions.ForwardAuthenticate =
IdentityConstants
.BearerAndApplicationScheme;
149
.AddBearerToken(
IdentityConstants
.BearerScheme)
163
=> services.Configure(
IdentityConstants
.ApplicationScheme, configure);
172
=> services.Configure(
IdentityConstants
.ExternalScheme, configure);
196
var bearerResult = await Context.AuthenticateAsync(
IdentityConstants
.BearerScheme);
205
return await Context.AuthenticateAsync(
IdentityConstants
.ApplicationScheme);
SecurityStampValidator.cs (3)
160
await SignInManager.Context.SignOutAsync(
IdentityConstants
.TwoFactorRememberMeScheme);
182
/// Used to validate the <see cref="
IdentityConstants
.TwoFactorUserIdScheme"/> and
183
/// <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;
313
if (await _schemes.GetSchemeAsync(
IdentityConstants
.ExternalScheme) != null)
315
await Context.SignOutAsync(
IdentityConstants
.ExternalScheme);
317
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorUserIdScheme) != null)
319
await Context.SignOutAsync(
IdentityConstants
.TwoFactorUserIdScheme);
704
var claimsIdentity = new ClaimsIdentity(
IdentityConstants
.TwoFactorUserIdScheme);
706
await Context.SignInAsync(
IdentityConstants
.TwoFactorUserIdScheme, claimsPrincipal, props);
715
var result = await Context.AuthenticateAsync(
IdentityConstants
.TwoFactorUserIdScheme);
716
await Context.SignOutAsync(
IdentityConstants
.TwoFactorUserIdScheme);
748
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorRememberMeScheme) == null)
754
var result = await Context.AuthenticateAsync(
IdentityConstants
.TwoFactorRememberMeScheme);
769
await Context.SignInAsync(
IdentityConstants
.TwoFactorRememberMeScheme,
772
_metrics?.RememberTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme);
776
_metrics?.RememberTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme, ex);
789
await Context.SignOutAsync(
IdentityConstants
.TwoFactorRememberMeScheme);
790
_metrics?.ForgetTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme);
794
_metrics?.ForgetTwoFactorClient(typeof(TUser).FullName!,
IdentityConstants
.TwoFactorRememberMeScheme, ex);
860
if (await _schemes.GetSchemeAsync(
IdentityConstants
.ExternalScheme) != null)
862
await Context.SignOutAsync(
IdentityConstants
.ExternalScheme);
865
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorUserIdScheme) != null)
867
await Context.SignOutAsync(
IdentityConstants
.TwoFactorUserIdScheme);
1092
var auth = await Context.AuthenticateAsync(
IdentityConstants
.ExternalScheme);
1179
var identity = new ClaimsIdentity(
IdentityConstants
.TwoFactorUserIdScheme);
1191
var rememberBrowserIdentity = new ClaimsIdentity(
IdentityConstants
.TwoFactorRememberMeScheme);
1236
if (await _schemes.GetSchemeAsync(
IdentityConstants
.TwoFactorUserIdScheme) != null)
1240
await Context.SignInAsync(
IdentityConstants
.TwoFactorUserIdScheme, StoreTwoFactorInfo(userId, loginProvider));
1249
await Context.SignOutAsync(
IdentityConstants
.ExternalScheme);
1269
var result = await Context.AuthenticateAsync(
IdentityConstants
.TwoFactorUserIdScheme);