Table of Contents

Class JwtRequestValidator

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

Validates JWT authorization request objects

public class JwtRequestValidator : IJwtRequestValidator
Inheritance
JwtRequestValidator
Implements
Inherited Members

Constructors

JwtRequestValidator(IdentityServerOptions, IIssuerNameService, ILogger<JwtRequestValidator>)

Instantiates an instance of private_key_jwt secret validator

public JwtRequestValidator(IdentityServerOptions options, IIssuerNameService issuerNameService, ILogger<JwtRequestValidator> logger)

Parameters

options IdentityServerOptions
issuerNameService IIssuerNameService
logger ILogger<JwtRequestValidator>

Fields

Handler

JWT handler

protected JsonWebTokenHandler Handler

Field Value

JsonWebTokenHandler

IssuerNameService

The issuer name service

protected readonly IIssuerNameService IssuerNameService

Field Value

IIssuerNameService

Logger

The logger

protected readonly ILogger Logger

Field Value

ILogger

Options

The options

protected readonly IdentityServerOptions Options

Field Value

IdentityServerOptions

Methods

GetAudienceUri()

The audience URI to use

protected Task<string> GetAudienceUri()

Returns

Task<string>

GetKeysAsync(Client)

Retrieves keys for a given client

protected virtual Task<List<SecurityKey>> GetKeysAsync(Client client)

Parameters

client Client

The client

Returns

Task<List<SecurityKey>>

ProcessPayloadAsync(JwtRequestValidationContext, JsonWebToken)

Processes the JWT contents

protected virtual Task<List<Claim>> ProcessPayloadAsync(JwtRequestValidationContext context, JsonWebToken token)

Parameters

context JwtRequestValidationContext
token JsonWebToken

The JWT token

Returns

Task<List<Claim>>

ValidateAsync(JwtRequestValidationContext)

public virtual Task<JwtRequestValidationResult> ValidateAsync(JwtRequestValidationContext context)

Parameters

context JwtRequestValidationContext

Returns

Task<JwtRequestValidationResult>

ValidateJwtAsync(JwtRequestValidationContext, IEnumerable<SecurityKey>)

Validates the JWT token

protected virtual Task<JsonWebToken> ValidateJwtAsync(JwtRequestValidationContext context, IEnumerable<SecurityKey> keys)

Parameters

context JwtRequestValidationContext
keys IEnumerable<SecurityKey>

Returns

Task<JsonWebToken>