62 references to Success
Aspire.Dashboard (5)
Authentication\AspirePolicyEvaluator.cs (3)
37/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> failed to authenticate.</returns> 72return AuthenticateResult.Success(ticket); 87? AuthenticateResult.Success(new AuthenticationTicket(context.User, "context.User"))
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
38return AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name));
Authentication\UnsecuredAuthenticationHandler.cs (1)
23return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name)));
Aspire.Hosting (1)
Dashboard\DashboardServiceAuth.cs (1)
58AuthenticateResult.Success(
BasicWebSite (1)
BasicAuthenticationHandler.cs (1)
34return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(
CustomAuthorizationFailureResponse (1)
Authentication\SampleAuthenticationHandler.cs (1)
21=> Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_id, "Api")));
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationHandler.cs (1)
208return AuthenticateResult.Success(new AuthenticationTicket(ticket.Principal,
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticateResult.cs (1)
68return Success(Ticket!.Clone());
Microsoft.AspNetCore.Authentication.Cookies (2)
CookieAuthenticationHandler.cs (2)
196return AuthenticateResult.Success(ticket); 226return AuthenticateResult.Success(new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name));
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationService.cs (1)
95return AuthenticateResult.Success(new AuthenticationTicket(principal, result.Properties, result.Ticket!.AuthenticationScheme));
Microsoft.AspNetCore.Authentication.Core.Test (2)
AuthenticationServiceTests.cs (1)
257return Task.FromResult(AuthenticateResult.Success(
TokenExtensionTests.cs (1)
165return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(), props, "simple")));
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
375return AuthenticateResult.Success(ticket);
Microsoft.AspNetCore.Authentication.Test (10)
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")))); 152authenticateResultFeature.AuthenticateResult = AuthenticateResult.Success(newTicket);
CookieTests.cs (1)
1850await DescribeAsync(res, AuthenticateResult.Success(new AuthenticationTicket(context.User, new AuthenticationProperties(), CookieAuthenticationDefaults.AuthenticationScheme)));
DynamicSchemeTests.cs (1)
125return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name)));
PolicyTests.cs (2)
377return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name))); 427return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name)));
TestHandlers.cs (2)
42return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name))); 74return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(principal, new AuthenticationProperties(), Scheme.Name)));
Microsoft.AspNetCore.Authorization.Policy (4)
IPolicyEvaluator.cs (1)
21/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> fail to authenticate. </returns>
PolicyEvaluator.cs (3)
33/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> failed to authenticate. </returns> 61return AuthenticateResult.Success(ticket); 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)); 904authenticateResultFeature.AuthenticateResult = AuthenticateResult.Success(newTicket); 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.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
360await DescribeAsync(res, AuthenticateResult.Success(new AuthenticationTicket(context.User, null, "Application")));
Microsoft.AspNetCore.Identity.Test (13)
SignInManagerTest.cs (13)
217.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), null, IdentityConstants.TwoFactorRememberMeScheme))).Verifiable(); 376.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 417.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 456.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 546.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 701.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 736.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 793.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), null, IdentityConstants.TwoFactorRememberMeScheme))).Verifiable(); 1041var authResult = AuthenticateResult.Success(new AuthenticationTicket(principal, properties, "blah")); 1072var authResult = AuthenticateResult.Success(new AuthenticationTicket(principal, properties, "blah")); 1104var authResult = AuthenticateResult.Success(new AuthenticationTicket(principal, properties, "blah")); 1202.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable(); 1268.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.TwoFactorUserIdScheme))).Verifiable();
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.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)));
Microsoft.AspNetCore.Tests (1)
WebApplicationTests.cs (1)
2866return Task.FromResult(AuthenticateResult.Success(
PathSchemeSelection (1)
Startup.cs (1)
52=> Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_id, "Api")));