AuthenticationTicket Class¶
Contains user identity information as well as additional authentication state.
- Namespace
Microsoft.AspNetCore.Authentication- Assemblies
- Microsoft.AspNetCore.Authentication
Syntax¶
public class AuthenticationTicket
-
class
Microsoft.AspNetCore.Authentication.AuthenticationTicket
Constructors¶
-
AuthenticationTicket(System.Security.Claims.ClaimsPrincipal, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties, System.String)¶ Initializes a new instance of the
Microsoft.AspNetCore.Authentication.AuthenticationTicketclassArguments: - principal (System.Security.Claims.ClaimsPrincipal) – the
System.Security.Claims.ClaimsPrincipalthat represents the authenticated user. - properties (Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties) – additional properties that can be consumed by the user or runtime.
- authenticationScheme (System.String) – the authentication middleware that was responsible for this ticket.
public AuthenticationTicket(ClaimsPrincipal principal, AuthenticationProperties properties, string authenticationScheme)
- principal (System.Security.Claims.ClaimsPrincipal) – the
-
Properties¶
-
Microsoft.AspNetCore.Authentication.AuthenticationTicket.AuthenticationScheme¶ Gets the authentication type.
Return type: System.String public string AuthenticationScheme { get; }
-
Microsoft.AspNetCore.Authentication.AuthenticationTicket.Principal¶ Gets the claims-principal with authenticated user identities.
Return type: System.Security.Claims.ClaimsPrincipal public ClaimsPrincipal Principal { get; }
-
Microsoft.AspNetCore.Authentication.AuthenticationTicket.Properties¶ Additional state values for the authentication session.
Return type: Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties public AuthenticationProperties Properties { get; }
-