Table of Contents

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

IReadOnlyCollection<Claim>

IsError

Whether the token was refused.

public bool IsError { get; init; }

Property Value

bool

SubjectId

The token's sub, which a valid result always has.

public string? SubjectId { get; }

Property Value

string

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

claims IReadOnlyCollection<Claim>

The token's claims.

Returns

IdentityTokenValidationResult

A result with IsError false.