ClaimsIdentity class
Represents a claims-based identity.
Constructors
Claims |
Initializes a new instance of the ClaimsIdentity class. |
Properties
claims | |
is |
Returns authentication status. |
Methods
get |
Returns a claim value (if its present) |
Constructor Details
ClaimsIdentity(Claim[], string | boolean)
Initializes a new instance of the ClaimsIdentity class.
new ClaimsIdentity(claims: Claim[], authenticationType?: string | boolean)
Parameters
- authenticationType
-
string | boolean
The type of auth for this set of claims, or boolean to override isAuthenticated
Property Details
claims
isAuthenticated
Returns authentication status.
boolean isAuthenticated
Property Value
boolean
True if is authenticated.
Method Details
getClaimValue(string)
Returns a claim value (if its present)
function getClaimValue(claimType: string): string | null
Parameters
- claimType
-
string
The claim type to look for
Returns
string | null
The claim value or null if not found