Table of Contents

Class InMemoryIdentityProviderStore

Namespace
Fdyay.IdentityServer.Stores
Assembly
Fdyay.IdentityServer.Core.dll

An IIdentityProviderStore over a fixed list. For development and tests.

public sealed class InMemoryIdentityProviderStore : IIdentityProviderStore
Inheritance
InMemoryIdentityProviderStore
Implements
Inherited Members

Remarks

"In memory" and "dynamic" are not opposites: what makes a provider dynamic is that nothing about it was decided when the authentication schemes were registered. A host swaps this for a database store without anything above it changing.

Constructors

InMemoryIdentityProviderStore(IEnumerable<IdentityProvider>)

A store over a fixed list of providers, copied when constructed.

public InMemoryIdentityProviderStore(IEnumerable<IdentityProvider> providers)

Parameters

providers IEnumerable<IdentityProvider>

The providers it answers with.

Exceptions

ArgumentNullException

providers is null.

Methods

GetAllSchemeNamesAsync(CancellationToken)

Every provider, in the shape the sign-in page needs to list them.

public Task<IEnumerable<IdentityProviderName>> GetAllSchemeNamesAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<IEnumerable<IdentityProviderName>>

GetBySchemeAsync(string, CancellationToken)

One provider in full, or null when this server has never heard of the scheme.

public Task<IdentityProvider?> GetBySchemeAsync(string scheme, CancellationToken cancellationToken = default)

Parameters

scheme string
cancellationToken CancellationToken

Returns

Task<IdentityProvider>