4 implementations of IAuthenticationService
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationService.cs (1)
14public class AuthenticationService : IAuthenticationService
Microsoft.AspNetCore.Authorization.Test (3)
PolicyEvaluatorTests.cs (2)
187public class SadAuthentication : IAuthenticationService 205public class EchoAuthentication : IAuthenticationService
TestObjects\TestAuthenticationService.cs (1)
10public class TestAuthenticationService : IAuthenticationService
122 references to IAuthenticationService
Microsoft.AspNetCore.Authentication (3)
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"/>. 85/// which can be used by <see cref="IAuthenticationService"/>.
Microsoft.AspNetCore.Authentication.Abstractions (26)
AuthenticationHttpContextExtensions.cs (3)
216private static IAuthenticationService GetAuthenticationService(HttpContext context) => 217context.RequestServices.GetService<IAuthenticationService>() ?? 219nameof(IAuthenticationService),
AuthenticationOptions.cs (5)
69/// Used as the default scheme by <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>. 74/// Used as the default scheme by <see cref="IAuthenticationService.SignInAsync(HttpContext, string, System.Security.Claims.ClaimsPrincipal, AuthenticationProperties)"/>. 79/// Used as the default scheme by <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/>. 84/// Used as the default scheme by <see cref="IAuthenticationService.ChallengeAsync(HttpContext, string, AuthenticationProperties)"/>. 89/// Used as the default scheme by <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>.
IAuthenticationSchemeProvider.cs (13)
27/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>. 31/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>.</returns> 35/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.ChallengeAsync(HttpContext, string, AuthenticationProperties)"/>. 39/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.ChallengeAsync(HttpContext, string, AuthenticationProperties)"/>.</returns> 43/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>. 47/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>.</returns> 51/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.SignInAsync(HttpContext, string, System.Security.Claims.ClaimsPrincipal, AuthenticationProperties)"/>. 55/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.SignInAsync(HttpContext, string, System.Security.Claims.ClaimsPrincipal, AuthenticationProperties)"/>.</returns> 59/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/>. 63/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/>.</returns> 67/// Registers a scheme for use by <see cref="IAuthenticationService"/>. 73/// Registers a scheme for use by <see cref="IAuthenticationService"/>. 91/// Removes a scheme, preventing it from being used by <see cref="IAuthenticationService"/>.
IClaimsTransformation.cs (1)
9/// Used by the <see cref="IAuthenticationService"/> for claims transformation.
TokenExtensions.cs (4)
119/// <param name="auth">The <see cref="IAuthenticationService"/>.</param> 123public static Task<string?> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName) 129/// <param name="auth">The <see cref="IAuthenticationService"/>.</param> 134public static async Task<string?> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string? scheme, string tokenName)
Microsoft.AspNetCore.Authentication.Core (17)
AuthenticationCoreServiceCollectionExtensions.cs (3)
15/// Add core authentication services needed for <see cref="IAuthenticationService"/>. 23services.TryAddScoped<IAuthenticationService, AuthenticationService>(); 31/// Add core authentication services needed for <see cref="IAuthenticationService"/>.
AuthenticationSchemeProvider.cs (13)
63/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>. 67/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.AuthenticateAsync(HttpContext, string)"/>.</returns> 74/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.ChallengeAsync(HttpContext, string, AuthenticationProperties)"/>. 78/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.ChallengeAsync(HttpContext, string, AuthenticationProperties)"/>.</returns> 85/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>. 89/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.ForbidAsync(HttpContext, string, AuthenticationProperties)"/>.</returns> 96/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.SignInAsync(HttpContext, string, System.Security.Claims.ClaimsPrincipal, AuthenticationProperties)"/>. 100/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.SignInAsync(HttpContext, string, System.Security.Claims.ClaimsPrincipal, AuthenticationProperties)"/>.</returns> 107/// Returns the scheme that will be used by default for <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/>. 111/// <returns>The scheme that will be used by default for <see cref="IAuthenticationService.SignOutAsync(HttpContext, string, AuthenticationProperties)"/>.</returns> 133/// Registers a scheme for use by <see cref="IAuthenticationService"/>. 163/// Registers a scheme for use by <see cref="IAuthenticationService"/>. 182/// Removes a scheme, preventing it from being used by <see cref="IAuthenticationService"/>.
AuthenticationService.cs (1)
12/// Implements <see cref="IAuthenticationService"/>.
Microsoft.AspNetCore.Authentication.Test (6)
AuthenticationMiddlewareTests.cs (6)
63var authenticationService = new Mock<IAuthenticationService>(); 86var authenticationService = new Mock<IAuthenticationService>(); 106var authenticationService = new Mock<IAuthenticationService>(); 132var authenticationService = new Mock<IAuthenticationService>(); 202IAuthenticationService authenticationService = null) 207authenticationService = authenticationService ?? Mock.Of<IAuthenticationService>();
Microsoft.AspNetCore.Authorization.Test (14)
AuthorizationAppBuilderExtensionsTests.cs (1)
64private IServiceProvider CreateServices(IAuthenticationService authenticationService)
AuthorizationMiddlewareResultHandlerTests.cs (6)
59var authenticationServiceMock = new Mock<IAuthenticationService>(); 83var authenticationServiceMock = new Mock<IAuthenticationService>(); 98var authenticationServiceMock = new Mock<IAuthenticationService>(); 122var authenticationServiceMock = new Mock<IAuthenticationService>(); 134private HttpContext CreateHttpContext(IAuthenticationService authenticationService = null) 138services.AddTransient(provider => authenticationService ?? new Mock<IAuthenticationService>().Object);
AuthorizationMiddlewareTests.cs (4)
825var authenticationService = new Mock<IAuthenticationService>(); 921var authenticationService = new Mock<IAuthenticationService>(); 1010IAuthenticationService authenticationService = null) 1035authenticationService = authenticationService ?? Mock.Of<IAuthenticationService>();
PolicyEvaluatorTests.cs (3)
19var services = new ServiceCollection().AddSingleton<IAuthenticationService, SadAuthentication>(); 36var services = new ServiceCollection().AddSingleton<IAuthenticationService, EchoAuthentication>(); 55var services = new ServiceCollection().AddSingleton<IAuthenticationService>(auth);
Microsoft.AspNetCore.Http.Results (2)
Results.cs (1)
29/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use.
TypedResults.cs (1)
29/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use.
Microsoft.AspNetCore.Http.Results.Tests (16)
ChallengeResultTests.cs (3)
19var auth = new Mock<IAuthenticationService>(); 34var auth = new Mock<IAuthenticationService>(); 55private static DefaultHttpContext GetHttpContext(Mock<IAuthenticationService> auth)
ForbidResultTests.cs (5)
19var auth = new Mock<IAuthenticationService>(); 39var auth = new Mock<IAuthenticationService>(); 71var auth = new Mock<IAuthenticationService>(); 92var auth = new Mock<IAuthenticationService>(); 122private static DefaultHttpContext GetHttpContext(IAuthenticationService auth)
SignInResultTests.cs (4)
20var auth = new Mock<IAuthenticationService>(); 41var auth = new Mock<IAuthenticationService>(); 62var auth = new Mock<IAuthenticationService>(); 88private static DefaultHttpContext GetHttpContext(IAuthenticationService auth)
SignOutResultTests.cs (4)
18var auth = new Mock<IAuthenticationService>(); 37var auth = new Mock<IAuthenticationService>(); 57var auth = new Mock<IAuthenticationService>(); 87private static DefaultHttpContext GetHttpContext(IAuthenticationService auth)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
ControllerTest.cs (2)
108private Mock<IAuthenticationService> MockAuth(HttpContext context) 110var auth = new Mock<IAuthenticationService>();
Microsoft.AspNetCore.Identity.Test (6)
SecurityStampValidatorTest.cs (3)
117var authService = new Mock<IAuthenticationService>(); 212var authService = new Mock<IAuthenticationService>(); 337var authService = new Mock<IAuthenticationService>();
SignInManagerTest.cs (3)
805private Mock<IAuthenticationService> MockAuth(HttpContext context) 807var auth = new Mock<IAuthenticationService>(); 975private static void SetupSignIn(HttpContext context, Mock<IAuthenticationService> auth, string userId = null, bool? isPersistent = null, string loginProvider = null, string amr = null)
Microsoft.AspNetCore.Mvc.Core (4)
ControllerBase.cs (4)
2321/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 2335/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 2350/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 2367/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use.
Microsoft.AspNetCore.Mvc.Core.Test (19)
Authorization\AuthorizeFilterTest.cs (1)
600var auth = new Mock<IAuthenticationService>();
ChallengeResultTest.cs (2)
23var auth = new Mock<IAuthenticationService>(); 49var auth = new Mock<IAuthenticationService>();
ForbidResultTest.cs (5)
22var auth = new Mock<IAuthenticationService>(); 49var auth = new Mock<IAuthenticationService>(); 87var auth = new Mock<IAuthenticationService>(); 115var auth = new Mock<IAuthenticationService>(); 139private static IServiceProvider CreateServices(IAuthenticationService auth)
SignInResultTest.cs (4)
24var auth = new Mock<IAuthenticationService>(); 51var auth = new Mock<IAuthenticationService>(); 79var auth = new Mock<IAuthenticationService>(); 100private static IServiceProvider CreateServices(IAuthenticationService auth)
SignOutResultTest.cs (7)
22var auth = new Mock<IAuthenticationService>(); 48var auth = new Mock<IAuthenticationService>(); 75var auth = new Mock<IAuthenticationService>(); 105var auth = new Mock<IAuthenticationService>(); 125var auth = new Mock<IAuthenticationService>(); 146var auth = new Mock<IAuthenticationService>(); 165private static IServiceProvider CreateServices(IAuthenticationService auth)
Microsoft.AspNetCore.Mvc.RazorPages (7)
PageBase.cs (3)
155/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 168/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 198/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use.
PageModel.cs (4)
487/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 500/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 514/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use. 530/// The behavior of this method depends on the <see cref="IAuthenticationService"/> in use.