55 references to ApplicationScheme
IdentitySample.Mvc (1)
Startup.cs (1)
45
o.DefaultScheme = IdentityConstants.
ApplicationScheme
;
Microsoft.AspNetCore.Identity (11)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
97
signInManager.AuthenticationScheme = useCookieScheme ? IdentityConstants.
ApplicationScheme
: IdentityConstants.BearerScheme;
IdentityConstants.cs (1)
24
/// The scheme used to identify combination of <see cref="BearerScheme"/> and <see cref="
ApplicationScheme
"/>.
IdentityCookiesBuilderExtensions.cs (2)
49
builder.AddCookie(IdentityConstants.
ApplicationScheme
, o =>
57
return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.
ApplicationScheme
);
IdentityServiceCollectionExtensions.cs (5)
55
options.DefaultAuthenticateScheme = IdentityConstants.
ApplicationScheme
;
56
options.DefaultChallengeScheme = IdentityConstants.
ApplicationScheme
;
59
.AddCookie(IdentityConstants.
ApplicationScheme
, o =>
161
=> services.Configure(IdentityConstants.
ApplicationScheme
, configure);
203
return await Context.AuthenticateAsync(IdentityConstants.
ApplicationScheme
);
SignInManager.cs (2)
85
/// The authentication scheme to sign in with. Defaults to <see cref="IdentityConstants.
ApplicationScheme
"/>.
87
public string AuthenticationScheme { get; set; } = IdentityConstants.
ApplicationScheme
;
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
SqlStoreTestBase.cs (1)
45
services.AddAuthentication(IdentityConstants.
ApplicationScheme
).AddIdentityCookies();
Microsoft.AspNetCore.Identity.FunctionalTests (5)
ManagementTests.cs (4)
117
services.SetupGetUserClaimsPrincipal(user => principals.Add(user), IdentityConstants.
ApplicationScheme
);
154
.SetupGetUserClaimsPrincipal(user => principals.Add(user), IdentityConstants.
ApplicationScheme
);
194
.SetupGetUserClaimsPrincipal(user => principals.Add(user), IdentityConstants.
ApplicationScheme
);
244
.SetupGetUserClaimsPrincipal(user => principals.Add(user), IdentityConstants.
ApplicationScheme
);
RegistrationTests.cs (1)
231
authenticationMethod = user.FindFirstValue(ClaimTypes.AuthenticationMethod), IdentityConstants.
ApplicationScheme
);
Microsoft.AspNetCore.Identity.InMemory.Test (2)
ControllerTest.cs (1)
24
auth.Setup(a => a.SignInAsync(context, IdentityConstants.
ApplicationScheme
,
FunctionalTest.cs (1)
385
services.AddAuthentication(IdentityConstants.
ApplicationScheme
).AddIdentityCookies();
Microsoft.AspNetCore.Identity.Test (33)
IdentityOptionsTest.cs (1)
87
Assert.Equal("a", options.Get(IdentityConstants.
ApplicationScheme
).Cookie.Name);
SecurityStampValidatorTest.cs (23)
62
var id = new ClaimsPrincipal(new ClaimsIdentity(IdentityConstants.
ApplicationScheme
));
63
var ticket = new AuthenticationTicket(id, new AuthenticationProperties { IssuedUtc = DateTimeOffset.UtcNow }, IdentityConstants.
ApplicationScheme
);
64
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
78
var id = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
84
IdentityConstants.
ApplicationScheme
);
86
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
111
var id = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
138
var id = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
142
IdentityConstants.
ApplicationScheme
);
144
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
179
var tid = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
183
IdentityConstants.
ApplicationScheme
);
185
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
220
var id = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
225
IdentityConstants.
ApplicationScheme
);
226
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
257
var id = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
262
IdentityConstants.
ApplicationScheme
);
263
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
295
var id = new ClaimsIdentity(IdentityConstants.
ApplicationScheme
);
304
IdentityConstants.
ApplicationScheme
);
305
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(),
350
var context = new CookieValidatePrincipalContext(httpContext.Object, new AuthenticationSchemeBuilder(IdentityConstants.
ApplicationScheme
) { HandlerType = typeof(NoopHandler) }.Build(), new CookieAuthenticationOptions(), ticket);
SignInManagerTest.cs (8)
534
IdentityConstants.
ApplicationScheme
,
616
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
ApplicationScheme
))
677
IdentityConstants.
ApplicationScheme
,
819
auth.Setup(a => a.SignOutAsync(context, IdentityConstants.
ApplicationScheme
, It.IsAny<AuthenticationProperties>())).Returns(Task.FromResult(0)).Verifiable();
978
IdentityConstants.
ApplicationScheme
,
1350
private static AuthenticationScheme CreateCookieScheme(string name) => new(IdentityConstants.
ApplicationScheme
, displayName: null, typeof(CookieAuthenticationHandler));
1354
[IdentityConstants.
ApplicationScheme
] = CreateCookieScheme(IdentityConstants.
ApplicationScheme
),
UserClaimsPrincipalFactoryTest.cs (1)
93
Assert.Equal(IdentityConstants.
ApplicationScheme
, identity.AuthenticationType);
Microsoft.AspNetCore.Identity.UI (2)
IdentityDefaultUIConfigureOptions.cs (1)
53
if (string.Equals(IdentityConstants.
ApplicationScheme
, name, StringComparison.Ordinal))
IdentityServiceCollectionUIExtensions.cs (1)
43
o.DefaultScheme = IdentityConstants.
ApplicationScheme
;