Table of Contents

Interface ITokenValidator

Namespace
Duende.IdentityServer.Validation
Assembly
Duende.IdentityServer.dll

Interface for the token validator

public interface ITokenValidator

Methods

ValidateAccessTokenAsync(string, string)

Validates an access token.

Task<TokenValidationResult> ValidateAccessTokenAsync(string token, string expectedScope = null)

Parameters

token string

The access token.

expectedScope string

The expected scope.

Returns

Task<TokenValidationResult>

ValidateIdentityTokenAsync(string, string, bool)

Validates an identity token.

Task<TokenValidationResult> ValidateIdentityTokenAsync(string token, string clientId = null, bool validateLifetime = true)

Parameters

token string

The token.

clientId string

The client identifier.

validateLifetime bool

if set to true the lifetime gets validated. Otherwise not.

Returns

Task<TokenValidationResult>