Class IdentityTokenValidationResult
- Namespace
- Fdyay.IdentityServer.Validation
- Assembly
- Fdyay.IdentityServer.Core.dll
The outcome of validating an identity token presented back to this server as a hint.
public sealed class IdentityTokenValidationResult
- Inheritance
-
IdentityTokenValidationResult
- Inherited Members
Properties
Claims
The identity token's claims; empty when it was refused.
public IReadOnlyCollection<Claim> Claims { get; init; }
Property Value
IsError
Whether the token was refused.
public bool IsError { get; init; }
Property Value
SubjectId
The token's sub, which a valid result always has.
public string? SubjectId { get; }
Property Value
Methods
Failure()
A refused identity token. It carries no reason.
public static IdentityTokenValidationResult Failure()
Returns
- IdentityTokenValidationResult
A result with IsError true and no claims.
Success(IReadOnlyCollection<Claim>)
A valid identity token.
public static IdentityTokenValidationResult Success(IReadOnlyCollection<Claim> claims)
Parameters
claimsIReadOnlyCollection<Claim>The token's claims.
Returns
- IdentityTokenValidationResult
A result with IsError false.