26 instantiations of AuthenticationTicket
Aspire.Dashboard (8)
Api\ApiAuthenticationHandler.cs (3)
43return AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name)); 76return AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name)); 84return AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name));
Authentication\AspirePolicyEvaluator.cs (2)
68var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes)); 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)
24return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name)));
Mcp\McpCompositeAuthenticationHandler.cs (1)
36return AuthenticateResult.Success(new AuthenticationTicket(new ClaimsPrincipal(id), Scheme.Name));
Aspire.Hosting (1)
Dashboard\DashboardServiceAuth.cs (1)
59new AuthenticationTicket(
Microsoft.AspNetCore.Authentication (4)
Events\RemoteAuthenticationContext.cs (1)
42public void Success() => Result = HandleRequestResult.Success(new AuthenticationTicket(Principal!, Properties, Scheme.Name));
Events\ResultContext.cs (1)
51public void Success() => Result = HandleRequestResult.Success(new AuthenticationTicket(Principal!, Properties, Scheme.Name));
RemoteAuthenticationHandler.cs (1)
208return AuthenticateResult.Success(new AuthenticationTicket(ticket.Principal,
TicketSerializer.cs (1)
185return new AuthenticationTicket(new ClaimsPrincipal(identities), properties, scheme);
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationTicket.cs (1)
66return new AuthenticationTicket(principal, Properties.Clone(), AuthenticationScheme);
Microsoft.AspNetCore.Authentication.BearerToken (2)
BearerTokenHandler.cs (2)
104=> new(user, properties, $"{Scheme.Name}:AccessToken"); 113return new AuthenticationTicket(user, refreshProperties, $"{Scheme.Name}:RefreshToken");
Microsoft.AspNetCore.Authentication.Cookies (5)
CookieAuthenticationHandler.cs (5)
147return new AuthenticationTicket(newPrincipal, newProperties, ticket.AuthenticationScheme); 226return AuthenticateResult.Success(new AuthenticationTicket(context.Principal, context.Properties, Scheme.Name)); 269ticket = new AuthenticationTicket(principal, null, Scheme.Name); 335var ticket = new AuthenticationTicket(signInContext.Principal!, signInContext.Properties, signInContext.Scheme.Name); 353ticket = new AuthenticationTicket(principal, null, Scheme.Name);
Microsoft.AspNetCore.Authentication.Core (1)
AuthenticationService.cs (1)
95return AuthenticateResult.Success(new AuthenticationTicket(principal, result.Properties, result.Ticket!.AuthenticationScheme));
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
258return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
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.Server.IISIntegration (1)
AuthenticationHandler.cs (1)
23return Task.FromResult(AuthenticateResult.Success(new AuthenticationTicket(_user, _scheme.Name)));
56 references to AuthenticationTicket
Aspire.Dashboard (1)
Authentication\AspirePolicyEvaluator.cs (1)
68var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes));
Microsoft.AspNetCore.Authentication (17)
AuthenticationHandler.cs (1)
227var ticket = result.Ticket;
Events\TicketReceivedContext.cs (1)
24AuthenticationTicket ticket)
HandleRequestResult.cs (1)
32public static new HandleRequestResult Success(AuthenticationTicket ticket)
RemoteAuthenticationHandler.cs (2)
82AuthenticationTicket? ticket = null; 203var ticket = result.Ticket;
TicketDataFormat.cs (2)
10/// <see cref="AuthenticationTicket"/>. 12public class TicketDataFormat : SecureDataFormat<AuthenticationTicket>
TicketSerializer.cs (10)
11/// Serializes and deserializes <see cref="AuthenticationTicket"/> instances. 13public class TicketSerializer : IDataSerializer<AuthenticationTicket> 28public virtual byte[] Serialize(AuthenticationTicket ticket) 44/// <returns>The deserialized <see cref="AuthenticationTicket"/>, or <see langword="null"/> if the format is unsupported.</returns> 45public virtual AuthenticationTicket? Deserialize(byte[] data) 60/// <param name="ticket">The <see cref="AuthenticationTicket"/>.</param> 61public virtual void Write(BinaryWriter writer, AuthenticationTicket ticket) 154/// Reads an <see cref="AuthenticationTicket"/>. 157/// <returns>The <see cref="AuthenticationTicket"/> if the format is supported, otherwise <see langword="null"/>.</returns> 158public virtual AuthenticationTicket? Read(BinaryReader reader)
Microsoft.AspNetCore.Authentication.Abstractions (5)
AuthenticateResult.cs (2)
30public AuthenticationTicket? Ticket { get; protected set; } 79public static AuthenticateResult Success(AuthenticationTicket ticket)
AuthenticationTicket.cs (3)
14/// Initializes a new instance of the <see cref="AuthenticationTicket"/> class 29/// Initializes a new instance of the <see cref="AuthenticationTicket"/> class 59public AuthenticationTicket Clone()
Microsoft.AspNetCore.Authentication.BearerToken (7)
BearerTokenHandler.cs (3)
43var ticket = Options.BearerTokenProtector.Unprotect(token); 103private AuthenticationTicket CreateBearerTicket(ClaimsPrincipal user, AuthenticationProperties properties) 106private AuthenticationTicket CreateRefreshTicket(ClaimsPrincipal user, DateTimeOffset utcNow)
BearerTokenOptions.cs (4)
13private ISecureDataFormat<AuthenticationTicket>? _bearerTokenProtector; 14private ISecureDataFormat<AuthenticationTicket>? _refreshTokenProtector; 48public ISecureDataFormat<AuthenticationTicket> BearerTokenProtector 59public ISecureDataFormat<AuthenticationTicket> RefreshTokenProtector
Microsoft.AspNetCore.Authentication.Cookies (20)
CookieAuthenticationHandler.cs (8)
34private AuthenticationTicket? _refreshTicket; 92private async Task CheckForRefreshAsync(AuthenticationTicket ticket) 116private void RequestRefresh(AuthenticationTicket ticket, ClaimsPrincipal? replacedPrincipal = null) 132private static AuthenticationTicket CloneTicket(AuthenticationTicket ticket, ClaimsPrincipal? replacedPrincipal) 158var ticket = Options.TicketDataFormat.Unprotect(cookie, GetTlsTokenBinding()); 247var ticket = _refreshTicket; 335var ticket = new AuthenticationTicket(signInContext.Principal!, signInContext.Properties, signInContext.Scheme.Name);
CookieAuthenticationOptions.cs (1)
109public ISecureDataFormat<AuthenticationTicket> TicketDataFormat { get; set; } = default!;
CookieSlidingExpirationContext.cs (1)
23AuthenticationTicket ticket, TimeSpan elapsedTime, TimeSpan remainingTime)
CookieValidatePrincipalContext.cs (1)
21public CookieValidatePrincipalContext(HttpContext context, AuthenticationScheme scheme, CookieAuthenticationOptions options, AuthenticationTicket ticket)
ITicketStore.cs (9)
20Task<string> StoreAsync(AuthenticationTicket ticket); 28Task<string> StoreAsync(AuthenticationTicket ticket, CancellationToken cancellationToken) => StoreAsync(ticket); 37Task<string> StoreAsync(AuthenticationTicket ticket, HttpContext httpContext, CancellationToken cancellationToken) => StoreAsync(ticket, cancellationToken); 45Task RenewAsync(string key, AuthenticationTicket ticket); 54Task RenewAsync(string key, AuthenticationTicket ticket, CancellationToken cancellationToken) => RenewAsync(key, ticket); 64Task RenewAsync(string key, AuthenticationTicket ticket, HttpContext httpContext, CancellationToken cancellationToken) => RenewAsync(key, ticket, cancellationToken); 71Task<AuthenticationTicket?> RetrieveAsync(string key); 79Task<AuthenticationTicket?> RetrieveAsync(string key, CancellationToken cancellationToken) => RetrieveAsync(key); 88Task<AuthenticationTicket?> RetrieveAsync(string key, HttpContext httpContext, CancellationToken cancellationToken) => RetrieveAsync(key, cancellationToken);
Microsoft.AspNetCore.Authentication.OAuth (4)
OAuthHandler.cs (4)
182var ticket = await CreateTicketAsync(identity, properties, tokens); 246/// Creates an <see cref="AuthenticationTicket"/> from the specified <paramref name="tokens"/>. 251/// <returns>The <see cref="AuthenticationTicket"/>.</returns> 252protected virtual async Task<AuthenticationTicket> CreateTicketAsync(ClaimsIdentity identity, AuthenticationProperties properties, OAuthTokenResponse tokens)
Microsoft.AspNetCore.Authorization.Policy (1)
PolicyEvaluator.cs (1)
57var ticket = new AuthenticationTicket(newPrincipal, string.Join(';', policy.AuthenticationSchemes));
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
127var refreshTicket = refreshTokenProtector.Unprotect(refreshRequest.RefreshToken);