Table of Contents

Class DefaultRefreshTokenService

Namespace
Duende.IdentityServer.Services
Assembly
Duende.IdentityServer.dll

Default refresh token service

public class DefaultRefreshTokenService : IRefreshTokenService
Inheritance
DefaultRefreshTokenService
Implements
Inherited Members

Constructors

DefaultRefreshTokenService(IRefreshTokenStore, IProfileService, IClock, PersistentGrantOptions, ILogger<DefaultRefreshTokenService>)

Initializes a new instance of the DefaultRefreshTokenService class.

public DefaultRefreshTokenService(IRefreshTokenStore refreshTokenStore, IProfileService profile, IClock clock, PersistentGrantOptions options, ILogger<DefaultRefreshTokenService> logger)

Parameters

refreshTokenStore IRefreshTokenStore

The refresh token store

profile IProfileService
clock IClock

The clock

options PersistentGrantOptions

The persistent grant options

logger ILogger<DefaultRefreshTokenService>

The logger

Fields

Logger

The logger

protected readonly ILogger Logger

Field Value

ILogger

Properties

Clock

The clock

protected IClock Clock { get; }

Property Value

IClock

Options

The persistent grant options

protected PersistentGrantOptions Options { get; }

Property Value

PersistentGrantOptions

Profile

The profile service

protected IProfileService Profile { get; }

Property Value

IProfileService

RefreshTokenStore

The refresh token store

protected IRefreshTokenStore RefreshTokenStore { get; }

Property Value

IRefreshTokenStore

Methods

AcceptConsumedTokenAsync(RefreshToken)

Callback to decide if an already consumed token should be accepted.

protected virtual Task<bool> AcceptConsumedTokenAsync(RefreshToken refreshToken)

Parameters

refreshToken RefreshToken

Returns

Task<bool>

CreateRefreshTokenAsync(RefreshTokenCreationRequest)

Creates the refresh token.

public virtual Task<string> CreateRefreshTokenAsync(RefreshTokenCreationRequest request)

Parameters

request RefreshTokenCreationRequest

Returns

Task<string>

The refresh token handle

UpdateRefreshTokenAsync(RefreshTokenUpdateRequest)

Updates the refresh token.

public virtual Task<string> UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request)

Parameters

request RefreshTokenUpdateRequest

Returns

Task<string>

The refresh token handle

ValidateRefreshTokenAsync(string, Client)

Validates a refresh token

public virtual Task<TokenValidationResult> ValidateRefreshTokenAsync(string tokenHandle, Client client)

Parameters

tokenHandle string

The token handle.

client Client

The client.

Returns

Task<TokenValidationResult>