27 references to AuthenticationTicket
Aspire.Dashboard (3)
Authentication\AspirePolicyEvaluator.cs (2)
68var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes)); 87? AuthenticateResult.Success(new AuthenticationTicket(context.User, "context.User"))
Authentication\UnsecuredAuthenticationHandler.cs (1)
23return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name)));
CustomAuthorizationFailureResponse (1)
Authentication\SampleAuthenticationHandler.cs (1)
21=> Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_id, "Api")));
Microsoft.AspNetCore.Authentication.Test (4)
AuthenticationMiddlewareTests.cs (4)
65.Returns(Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "custom")))); 108.Returns(Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "custom")))); 134.Returns(Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "custom")))); 151var newTicket = new AuthenticationTicket(new ClaimsPrincipal(), "");
Microsoft.AspNetCore.Authorization.Policy (2)
PolicyEvaluator.cs (2)
57var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes)); 76? AuthenticateResult.Success(new AuthenticationTicket(context.User, "context.User"))
Microsoft.AspNetCore.Authorization.Test (11)
AuthorizationMiddlewareTests.cs (6)
829var res = AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(c.User.Identities.FirstOrDefault(i => i.AuthenticationType == scheme)), scheme)); 836var res = AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(c.User.Identities.FirstOrDefault(i => i.AuthenticationType == scheme)), scheme)); 903var newTicket = new AuthenticationTicket(new ClaimsPrincipal(), ""); 925var res = AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(c.User.Identities.FirstOrDefault(i => i.AuthenticationType == scheme)), scheme)); 932var authenticateResult = AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "")); 958var authenticateResult = AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), ""));
PolicyEvaluatorTests.cs (4)
92var success = AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "whatever")); 129var result = await evaluator.AuthorizeAsync(policy, AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "scheme")), context, resource: null); 149var result = await evaluator.AuthorizeAsync(policy, AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), "scheme")), context, resource: null); 212return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(Principal, scheme)));
TestObjects\TestAuthenticationService.cs (1)
27return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(identity), scheme)));
Microsoft.AspNetCore.Mvc.Core.Test (2)
Authorization\AuthorizeFilterTest.cs (2)
612auth.Setup(c => c.AuthenticateAsync(httpContext.Object, "Bearer")).ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(bearerPrincipal, "Bearer"))); 613auth.Setup(c => c.AuthenticateAsync(httpContext.Object, "Basic")).ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(basicPrincipal, "Basic")));
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)));
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2867new AuthenticationTicket(principal, "custom")));
PathSchemeSelection (1)
Startup.cs (1)
52=> Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_id, "Api")));