3 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.IISIntegration (1)
IISMiddleware.cs (1)
87authentication.AddScheme(new AuthenticationScheme(IISDefaults.AuthenticationScheme, _options.AuthenticationDisplayName, typeof(AuthenticationHandler)));
94 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.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.OAuth (1)
Events\OAuthCreatingTicketContext.cs (1)
32AuthenticationScheme scheme,
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.Server.IISIntegration (2)
AuthenticationHandler.cs (2)
15private AuthenticationScheme? _scheme; 48public Task InitializeAsync(AuthenticationScheme scheme, HttpContext context)