Interface IAuthenticationToken
- Namespace
- Excalibur.A3.Authentication
- Assembly
- Excalibur.A3.Abstractions.dll
Represents an authentication token containing identity and claims information.
public interface IAuthenticationToken
Properties
AuthenticationState
Gets the current authentication state of the token. Indicates whether the user is anonymous, authenticated, or fully identified.
AuthenticationState AuthenticationState { get; }
Property Value
- AuthenticationState
The current authentication state of the token.
Claims
Gets the claims for this authentication token.
IEnumerable<Claim>? Claims { get; }
Property Value
- IEnumerable<Claim>
The collection of claims, or null if no claims are available.
FirstName
Gets the first name of the authenticated user. Returns null if the user's identity is not available or not set.
string? FirstName { get; }
Property Value
FullName
Gets the full name of the authenticated user, constructed from FirstName and LastName. Returns an empty string if neither property is set.
string FullName { get; }
Property Value
- string
The full name of the authenticated user, or an empty string if neither property is set.
Jwt
Gets or sets the raw JWT (JSON Web Token) string associated with the authentication token. This property can be null if the token has not been issued or is not applicable.
string? Jwt { get; set; }
Property Value
LastName
Gets the last name of the authenticated user. Returns null if the user's identity is not available or not set.
string? LastName { get; }
Property Value
Login
Gets the login identifier (e.g., email address or username) of the authenticated user. Returns null if the user's login information is not available.
string? Login { get; }
Property Value
UserId
Gets the unique user identifier (e.g., GUID or system-specific identifier) associated with the authentication token. Returns null if the user ID is not available or applicable.
string? UserId { get; }
Property Value
Methods
IsAnonymous()
Determines whether the provided authentication token represents an anonymous user.
bool IsAnonymous()
Returns
- bool
trueif the token represents an anonymous user; otherwise,false.
IsAuthenticated()
Determines whether the provided authentication token represents an authenticated user.
bool IsAuthenticated()
Returns
- bool
trueif the token represents an authenticated user; otherwise,false.