5 instantiations of AuthenticationScheme
Aspire.Dashboard.Tests (1)
OtlpApiKeyAuthenticationHandlerTests.cs (1)
100await handler.InitializeAsync(new AuthenticationScheme("Test", "Test", handler.GetType()), httpContext);
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationSchemeBuilder.cs (1)
49return new AuthenticationScheme(Name, DisplayName, HandlerType);
Microsoft.AspNetCore.Server.HttpSys (1)
MessagePump.cs (1)
48authentication.AddScheme(new AuthenticationScheme(HttpSysDefaults.AuthenticationScheme, displayName: _options.Authentication.AuthenticationDisplayName, handlerType: typeof(AuthenticationHandler)));
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpServer.cs (1)
78authentication.AddScheme(new AuthenticationScheme(IISServerDefaults.AuthenticationScheme, _options.AuthenticationDisplayName, typeof(IISServerAuthenticationHandlerInternal)));
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
87authentication.AddScheme(new AuthenticationScheme(IISDefaults.AuthenticationScheme, _options.AuthenticationDisplayName, typeof(AuthenticationHandler)));
138 references to AuthenticationScheme
Microsoft.AspNetCore.Authentication (25)
AuthenticationBuilder.cs (3)
57/// Adds a <see cref="AuthenticationScheme"/> which can be used by <see cref="IAuthenticationService"/>. 71/// Adds a <see cref="AuthenticationScheme"/> which can be used by <see cref="IAuthenticationService"/>. 84/// Adds a <see cref="RemoteAuthenticationHandler{TOptions}"/> based <see cref="AuthenticationScheme"/> that supports remote authentication
AuthenticationHandler.cs (5)
21/// Gets or sets the <see cref="AuthenticationScheme"/> associated with this authentication handler. 23public AuthenticationScheme Scheme { get; private set; } = default!; 97/// The <c>ClaimsIssuer</c> configured in <typeparamref name="TOptions"/>, if configured, otherwise <see cref="AuthenticationScheme.Name"/>. 147public async Task InitializeAsync(AuthenticationScheme scheme, HttpContext context) 167/// Initializes the events object, called once per request by <see cref="InitializeAsync(AuthenticationScheme, HttpContext)"/>.
AuthenticationMiddleware.cs (2)
50foreach (var scheme in await Schemes.GetRequestHandlerSchemesAsync()) 59var defaultAuthenticate = await Schemes.GetDefaultAuthenticateSchemeAsync();
Events\AccessDeniedContext.cs (2)
17/// <param name="scheme">The <see cref="AuthenticationScheme"/>.</param> 21AuthenticationScheme scheme,
Events\BaseContext.cs (2)
19protected BaseContext(HttpContext context, AuthenticationScheme scheme, TOptions options) 33public AuthenticationScheme Scheme { get; }
Events\HandleRequestContext.cs (2)
18/// <param name="scheme">The <see cref="AuthenticationScheme"/>.</param> 22AuthenticationScheme scheme,
Events\PrincipalContext.cs (1)
21protected PrincipalContext(HttpContext context, AuthenticationScheme scheme, TOptions options, AuthenticationProperties? properties)
Events\PropertiesContext.cs (1)
20protected PropertiesContext(HttpContext context, AuthenticationScheme scheme, TOptions options, AuthenticationProperties? properties)
Events\RedirectContext.cs (1)
23AuthenticationScheme scheme,
Events\RemoteAuthenticationContext.cs (1)
23AuthenticationScheme scheme,
Events\RemoteFailureContext.cs (2)
17/// <param name="scheme">The <see cref="AuthenticationScheme"/>.</param> 22AuthenticationScheme scheme,
Events\ResultContext.cs (1)
22protected ResultContext(HttpContext context, AuthenticationScheme scheme, TOptions options)
Events\TicketReceivedContext.cs (2)
17/// <param name="scheme">The <see cref="AuthenticationScheme"/>.</param> 22AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.Abstractions (23)
AuthenticationOptions.cs (2)
28/// Adds an <see cref="AuthenticationScheme"/>. 49/// Adds an <see cref="AuthenticationScheme"/>.
AuthenticationScheme.cs (1)
15/// Initializes a new instance of <see cref="AuthenticationScheme"/>.
AuthenticationSchemeBuilder.cs (5)
9/// Used to build <see cref="AuthenticationScheme"/>s. 39/// Builds the <see cref="AuthenticationScheme"/> instance. 41/// <returns>The <see cref="AuthenticationScheme"/>.</returns> 42public AuthenticationScheme Build() 46throw new InvalidOperationException($"{nameof(HandlerType)} must be configured to build an {nameof(AuthenticationScheme)}.");
IAuthenticationHandler.cs (2)
16/// <param name="scheme">The <see cref="AuthenticationScheme"/> scheme.</param> 18Task InitializeAsync(AuthenticationScheme scheme, HttpContext context);
IAuthenticationSchemeProvider.cs (13)
14/// Returns all currently registered <see cref="AuthenticationScheme"/>s. 16/// <returns>All currently registered <see cref="AuthenticationScheme"/>s.</returns> 17Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync(); 20/// Returns the <see cref="AuthenticationScheme"/> matching the name, or null. 24Task<AuthenticationScheme?> GetSchemeAsync(string name); 32Task<AuthenticationScheme?> GetDefaultAuthenticateSchemeAsync(); 40Task<AuthenticationScheme?> GetDefaultChallengeSchemeAsync(); 48Task<AuthenticationScheme?> GetDefaultForbidSchemeAsync(); 56Task<AuthenticationScheme?> GetDefaultSignInSchemeAsync(); 64Task<AuthenticationScheme?> GetDefaultSignOutSchemeAsync(); 70void AddScheme(AuthenticationScheme scheme); 77bool TryAddScheme(AuthenticationScheme scheme) 100Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync();
Microsoft.AspNetCore.Authentication.BearerToken (1)
MessageReceivedContext.cs (1)
19AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.Certificate (3)
Events\CertificateAuthenticationFailedContext.cs (1)
21AuthenticationScheme scheme,
Events\CertificateChallengeContext.cs (1)
22AuthenticationScheme scheme,
Events\CertificateValidatedContext.cs (1)
22AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.Cookies (5)
CookieSignedInContext.cs (1)
24AuthenticationScheme scheme,
CookieSigningInContext.cs (1)
25AuthenticationScheme scheme,
CookieSigningOutContext.cs (1)
23AuthenticationScheme scheme,
CookieSlidingExpirationContext.cs (1)
22public CookieSlidingExpirationContext(HttpContext context, AuthenticationScheme scheme, CookieAuthenticationOptions options,
CookieValidatePrincipalContext.cs (1)
21public CookieValidatePrincipalContext(HttpContext context, AuthenticationScheme scheme, CookieAuthenticationOptions options, AuthenticationTicket ticket)
Microsoft.AspNetCore.Authentication.Core (34)
AuthenticationHandlerProvider.cs (1)
44var scheme = await Schemes.GetSchemeAsync(authenticationScheme);
AuthenticationSchemeProvider.cs (28)
21: this(options, new Dictionary<string, AuthenticationScheme>(StringComparer.Ordinal)) 31protected AuthenticationSchemeProvider(IOptions<AuthenticationOptions> options, IDictionary<string, AuthenticationScheme> schemes) 36_requestHandlers = new List<AuthenticationScheme>(); 40var scheme = builder.Build(); 48private readonly IDictionary<string, AuthenticationScheme> _schemes; 49private readonly List<AuthenticationScheme> _requestHandlers; 50private static readonly Task<AuthenticationScheme?> _nullScheme = Task.FromResult<AuthenticationScheme?>(null); 51private Task<AuthenticationScheme?> _autoDefaultScheme = _nullScheme; 54private IEnumerable<AuthenticationScheme> _schemesCopy = Array.Empty<AuthenticationScheme>(); 55private IEnumerable<AuthenticationScheme> _requestHandlersCopy = Array.Empty<AuthenticationScheme>(); 57private Task<AuthenticationScheme?> GetDefaultSchemeAsync() 68public virtual Task<AuthenticationScheme?> GetDefaultAuthenticateSchemeAsync() 79public virtual Task<AuthenticationScheme?> GetDefaultChallengeSchemeAsync() 90public virtual Task<AuthenticationScheme?> GetDefaultForbidSchemeAsync() 101public virtual Task<AuthenticationScheme?> GetDefaultSignInSchemeAsync() 112public virtual Task<AuthenticationScheme?> GetDefaultSignOutSchemeAsync() 118/// Returns the <see cref="AuthenticationScheme"/> matching the name, or null. 122public virtual Task<AuthenticationScheme?> GetSchemeAsync(string name) 123=> Task.FromResult(_schemes.TryGetValue(name, out var scheme) ? scheme : null); 129public virtual Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync() 137public virtual bool TryAddScheme(AuthenticationScheme scheme) 166public virtual void AddScheme(AuthenticationScheme scheme) 193if (_schemes.TryGetValue(name, out var scheme)) 207public virtual Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync() 216_autoDefaultScheme = Task.FromResult<AuthenticationScheme?>(_schemesCopy.First());
AuthenticationService.cs (5)
67var defaultScheme = await Schemes.GetDefaultAuthenticateSchemeAsync(); 112var defaultChallengeScheme = await Schemes.GetDefaultChallengeSchemeAsync(); 135var defaultForbidScheme = await Schemes.GetDefaultForbidSchemeAsync(); 173var defaultScheme = await Schemes.GetDefaultSignInSchemeAsync(); 201var defaultScheme = await Schemes.GetDefaultSignOutSchemeAsync();
Microsoft.AspNetCore.Authentication.JwtBearer (5)
AuthenticationFailedContext.cs (1)
19AuthenticationScheme scheme,
ForbiddenContext.cs (1)
19AuthenticationScheme scheme,
JwtBearerChallengeContext.cs (1)
19AuthenticationScheme scheme,
MessageReceivedContext.cs (1)
19AuthenticationScheme scheme,
TokenValidatedContext.cs (1)
20AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.Negotiate (4)
Events\AuthenticatedContext.cs (1)
19AuthenticationScheme scheme,
Events\AuthenticationFailedContext.cs (1)
21AuthenticationScheme scheme,
Events\ChallengeContext.cs (1)
19AuthenticationScheme scheme,
Events\LdapContext.cs (1)
22AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.OAuth (1)
Events\OAuthCreatingTicketContext.cs (1)
32AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.OpenIdConnect (9)
Events\AuthenticationFailedContext.cs (1)
20public AuthenticationFailedContext(HttpContext context, AuthenticationScheme scheme, OpenIdConnectOptions options)
Events\AuthorizationCodeReceivedContext.cs (1)
21AuthenticationScheme scheme,
Events\MessageReceivedContext.cs (1)
20AuthenticationScheme scheme,
Events\PushedAuthorizationContext.cs (1)
23public PushedAuthorizationContext(HttpContext context, AuthenticationScheme scheme, OpenIdConnectOptions options, OpenIdConnectMessage parRequest, AuthenticationProperties properties)
Events\RedirectContext.cs (1)
22AuthenticationScheme scheme,
Events\RemoteSignoutContext.cs (1)
21public RemoteSignOutContext(HttpContext context, AuthenticationScheme scheme, OpenIdConnectOptions options, OpenIdConnectMessage? message)
Events\TokenResponseReceivedContext.cs (1)
18public TokenResponseReceivedContext(HttpContext context, AuthenticationScheme scheme, OpenIdConnectOptions options, ClaimsPrincipal user, AuthenticationProperties properties)
Events\TokenValidatedContext.cs (1)
24public TokenValidatedContext(HttpContext context, AuthenticationScheme scheme, OpenIdConnectOptions options, ClaimsPrincipal principal, AuthenticationProperties properties)
Events\UserInformationReceivedContext.cs (1)
24public UserInformationReceivedContext(HttpContext context, AuthenticationScheme scheme, OpenIdConnectOptions options, ClaimsPrincipal principal, AuthenticationProperties properties)
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterCreatingTicketContext.cs (1)
30AuthenticationScheme scheme,
Microsoft.AspNetCore.Authentication.WsFederation (6)
AuthenticationFailedContext.cs (1)
20public AuthenticationFailedContext(HttpContext context, AuthenticationScheme scheme, WsFederationOptions options)
MessageReceivedContext.cs (1)
23AuthenticationScheme scheme,
RedirectContext.cs (1)
24AuthenticationScheme scheme,
RemoteSignoutContext.cs (1)
21public RemoteSignOutContext(HttpContext context, AuthenticationScheme scheme, WsFederationOptions options, WsFederationMessage message)
SecurityTokenReceivedContext.cs (1)
17public SecurityTokenReceivedContext(HttpContext context, AuthenticationScheme scheme, WsFederationOptions options, AuthenticationProperties properties)
SecurityTokenValidatedContext.cs (1)
19public SecurityTokenValidatedContext(HttpContext context, AuthenticationScheme scheme, WsFederationOptions options, ClaimsPrincipal principal, AuthenticationProperties properties)
Microsoft.AspNetCore.Identity (3)
SignInManager.cs (3)
1075/// Gets a collection of <see cref="Authentication.AuthenticationScheme"/>s for the known external login providers. 1077/// <returns>A collection of <see cref="Authentication.AuthenticationScheme"/>s for the known external login providers.</returns> 1078public virtual async Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync()
Microsoft.AspNetCore.Identity.UI (12)
_generated\17\ExternalLogins_cshtml.g.cs (1)
313foreach (var provider in Model.OtherLogins)
_generated\30\Register_cshtml.g.cs (1)
399foreach (var provider in Model.ExternalLogins!)
_generated\49\Login_cshtml.g.cs (1)
460foreach (var provider in Model.ExternalLogins!)
_generated\59\ExternalLogins_cshtml.g.cs (1)
313foreach (var provider in Model.OtherLogins)
_generated\7\Login_cshtml.g.cs (1)
447foreach (var provider in Model.ExternalLogins!)
_generated\72\Register_cshtml.g.cs (1)
409foreach (var provider in Model.ExternalLogins!)
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (1)
34public IList<AuthenticationScheme>? ExternalLogins { get; set; }
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (1)
28public IList<AuthenticationScheme>? OtherLogins { get; set; }
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
43public IList<AuthenticationScheme>? ExternalLogins { get; set; }
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (1)
34public IList<AuthenticationScheme>? ExternalLogins { get; set; }
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (1)
28public IList<AuthenticationScheme>? OtherLogins { get; set; }
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
43public IList<AuthenticationScheme>? ExternalLogins { get; set; }
Microsoft.AspNetCore.Server.HttpSys (2)
AuthenticationHandler.cs (2)
12private AuthenticationScheme? _scheme; 36public Task InitializeAsync(AuthenticationScheme scheme, HttpContext context)
Microsoft.AspNetCore.Server.IIS (2)
Core\IISServerAuthenticationHandlerInternal.cs (2)
19internal AuthenticationScheme? Scheme { get; private set; } 58public Task InitializeAsync(AuthenticationScheme scheme, HttpContext context)
Microsoft.AspNetCore.Server.IISIntegration (2)
AuthenticationHandler.cs (2)
15private AuthenticationScheme? _scheme; 48public Task InitializeAsync(AuthenticationScheme scheme, HttpContext context)