1 write to Name
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationScheme.cs (1)
29Name = name;
109 references to Name
Aspire.Dashboard (2)
Authentication\UnsecuredAuthenticationHandler.cs (1)
23return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name)));
DashboardWebApplication.cs (1)
690context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
BasicWebSite (2)
BasicAuthenticationHandler.cs (2)
32Scheme.Name)); 37Scheme.Name)));
Certificate.Sample (1)
Startup.cs (1)
28context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
Identity.ExternalClaims (1)
Pages\Account\Manage\ExternalLogins.cshtml.cs (1)
48.Where(auth => CurrentLogins.All(ul => auth.Name != ul.LoginProvider))
IdentitySample.Mvc (1)
Controllers\ManageController.cs (1)
308var otherLogins = schemes.Where(auth => userLogins.All(ul => auth.Name != ul.LoginProvider)).ToList();
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
135await ctx.Response.WriteAsync(authScheme?.Name ?? "null");
Microsoft.AspNetCore.Authentication (16)
AuthenticationHandler.cs (9)
97/// The <c>ClaimsIssuer</c> configured in <typeparamref name="TOptions"/>, if configured, otherwise <see cref="AuthenticationScheme.Name"/>. 99protected virtual string ClaimsIssuer => Options.ClaimsIssuer ?? Scheme.Name; 155Options = OptionsMonitor.Get(Scheme.Name); 209return string.Equals(target, Scheme.Name, StringComparison.Ordinal) 230Logger.AuthenticationSchemeAuthenticated(Scheme.Name); 234Logger.AuthenticationSchemeNotAuthenticated(Scheme.Name); 239Logger.AuthenticationSchemeNotAuthenticatedWithFailure(Scheme.Name, result.Failure.Message); 317Logger.AuthenticationSchemeChallenged(Scheme.Name); 332Logger.AuthenticationSchemeForbidden(Scheme.Name);
AuthenticationMiddleware.cs (2)
52var handler = await handlers.GetHandlerAsync(context, scheme.Name) as IAuthenticationRequestHandler; 62var result = await context.AuthenticateAsync(defaultAuthenticate.Name);
Events\RemoteAuthenticationContext.cs (1)
42public void Success() => Result = HandleRequestResult.Success(new AuthenticationTicket(Principal!, Properties, Scheme.Name));
Events\ResultContext.cs (1)
51public void Success() => Result = HandleRequestResult.Success(new AuthenticationTicket(Principal!, Properties, Scheme.Name));
RemoteAuthenticationHandler.cs (3)
154ticketContext.Properties!.Items[AuthSchemeKey] = Scheme.Name; 206&& string.Equals(Scheme.Name, authenticatedScheme, StringComparison.Ordinal)) 209ticket.Properties, Scheme.Name));
Microsoft.AspNetCore.Authentication.Cookies (7)
CookieAuthenticationHandler.cs (7)
226return AuthenticateResult.Success(new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name)); 268Scheme.Name)); 269ticket = new AuthenticationTicket(principal, null, Scheme.Name); 335var ticket = new AuthenticationTicket(signInContext.Principal!, signInContext.Properties, signInContext.Scheme.Name); 353ticket = new AuthenticationTicket(principal, null, Scheme.Name); 377Logger.AuthenticationSchemeSignedIn(Scheme.Name); 413Logger.AuthenticationSchemeSignedOut(Scheme.Name);
Microsoft.AspNetCore.Authentication.Core (14)
AuthenticationSchemeProvider.cs (6)
139if (_schemes.ContainsKey(scheme.Name)) 145if (_schemes.ContainsKey(scheme.Name)) 154_schemes[scheme.Name] = scheme; 168if (_schemes.ContainsKey(scheme.Name)) 170throw new InvalidOperationException("Scheme already exists: " + scheme.Name); 176throw new InvalidOperationException("Scheme already exists: " + scheme.Name);
AuthenticationService.cs (8)
64scheme = defaultScheme?.Name; 112scheme = defaultChallengeScheme?.Name; 140scheme = defaultForbidScheme?.Name; 183scheme = defaultScheme?.Name; 217scheme = defaultScheme?.Name; 241var schemes = string.Join(", ", (await Schemes.GetAllSchemesAsync()).Select(sch => sch.Name)); 259.Select(sch => sch.Name)); 299.Select(sch => sch.Name));
Microsoft.AspNetCore.Authentication.Core.Test (21)
AuthenticationSchemeProviderTests.cs (21)
49Assert.Equal("B", (await provider.GetDefaultForbidSchemeAsync())!.Name); 50Assert.Equal("B", (await provider.GetDefaultAuthenticateSchemeAsync())!.Name); 51Assert.Equal("B", (await provider.GetDefaultChallengeSchemeAsync())!.Name); 52Assert.Equal("B", (await provider.GetDefaultSignInSchemeAsync())!.Name); 53Assert.Equal("B", (await provider.GetDefaultSignOutSchemeAsync())!.Name); 67Assert.Equal("B", (await provider.GetDefaultForbidSchemeAsync())!.Name); 68Assert.Equal("B", (await provider.GetDefaultAuthenticateSchemeAsync())!.Name); 69Assert.Equal("B", (await provider.GetDefaultChallengeSchemeAsync())!.Name); 70Assert.Equal("B", (await provider.GetDefaultSignInSchemeAsync())!.Name); 71Assert.Equal("B", (await provider.GetDefaultSignOutSchemeAsync())!.Name); 87Assert.Equal("signin", scheme!.Name); 103Assert.Equal("challenge", scheme!.Name); 124Assert.Equal("B", (await provider.GetDefaultForbidSchemeAsync())!.Name); 125Assert.Equal("C", (await provider.GetDefaultAuthenticateSchemeAsync())!.Name); 126Assert.Equal("A", (await provider.GetDefaultChallengeSchemeAsync())!.Name); 127Assert.Equal("C", (await provider.GetDefaultSignInSchemeAsync())!.Name); 128Assert.Equal("A", (await provider.GetDefaultSignOutSchemeAsync())!.Name); 227provider.RemoveScheme(scheme2.Name); 231provider.RemoveScheme(scheme2.Name); 235provider.RemoveScheme(scheme1.Name); 239provider.RemoveScheme(scheme3.Name);
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
63return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
61return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
57return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
374var ticket = new AuthenticationTicket(authenticatedContext.Principal, authenticatedContext.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.OAuth (2)
Events\OAuthCreatingTicketContext.cs (1)
117action.Run(userData, Identity!, Options.ClaimsIssuer ?? Scheme.Name);
OAuthHandler.cs (1)
258return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.OpenIdConnect (5)
OpenIdConnectHandler.cs (5)
305Logger.AuthenticationSchemeSignedOut(Scheme.Name); 926return HandleRequestResult.Success(new AuthenticationTicket(user, properties, Scheme.Name)); 1049return HandleRequestResult.Success(new AuthenticationTicket(principal, properties, Scheme.Name)); 1054return HandleRequestResult.Success(new AuthenticationTicket(principal, properties, Scheme.Name)); 1106return HandleRequestResult.Success(new AuthenticationTicket(principal, properties, Scheme.Name));
Microsoft.AspNetCore.Authentication.Test (23)
CertificateTests.cs (4)
587context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); 657context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); 714context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); 916context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
DynamicSchemeTests.cs (3)
119id.AddClaim(new Claim(ClaimTypes.NameIdentifier, Scheme.Name, ClaimValueTypes.String, Scheme.Name)); 125return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name)));
JwtBearerTests.cs (1)
235context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
JwtBearerTests_Handler.cs (1)
222context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
OpenIdConnect\OpenIdConnectEventTests.cs (1)
764context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (1)
764context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name));
PolicyTests.cs (6)
375id.AddClaim(new Claim(ClaimTypes.NameIdentifier, Scheme.Name, ClaimValueTypes.String, Scheme.Name)); 377return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name))); 425id.AddClaim(new Claim(ClaimTypes.NameIdentifier, Scheme.Name, ClaimValueTypes.String, Scheme.Name)); 427return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name)));
TestHandlers.cs (6)
40id.AddClaim(new Claim(ClaimTypes.NameIdentifier, Scheme.Name, ClaimValueTypes.String, Scheme.Name)); 42return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name))); 72id.AddClaim(new Claim(ClaimTypes.NameIdentifier, Scheme.Name, ClaimValueTypes.String, Scheme.Name)); 74return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name)));
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
160return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
Microsoft.AspNetCore.Authentication.WsFederation (1)
WsFederationHandler.cs (1)
349return HandleRequestResult.Success(new AuthenticationTicket(principal, properties, Scheme.Name));
Microsoft.AspNetCore.Identity (1)
SignInManager.cs (1)
711var providerDisplayName = (await GetExternalAuthenticationSchemesAsync()).FirstOrDefault(p => p.Name == provider)?.DisplayName
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (1)
94.Where(auth => CurrentLogins.All(ul => auth.Name != ul.LoginProvider))
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (1)
94.Where(auth => CurrentLogins.All(ul => auth.Name != ul.LoginProvider))
Microsoft.AspNetCore.Server.HttpSys (1)
AuthenticationHandler.cs (1)
19return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_requestContext.User!, properties: null, authenticationScheme: _scheme!.Name)));
Microsoft.AspNetCore.Server.IIS (1)
Core\IISServerAuthenticationHandlerInternal.cs (1)
30return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(user, Scheme.Name)));
Microsoft.AspNetCore.Server.IISIntegration (1)
AuthenticationHandler.cs (1)
23return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_user, _scheme.Name)));
SocialSample (1)
Startup.cs (1)
266await response.WriteAsync("<a href=\"?authscheme=" + provider.Name + "\">" + (provider.DisplayName ?? "(suppressed)") + "</a><br>");