Table of Contents

Class InMemoryResourcesStore

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

In-memory resource store backed by fixed collections.

public class InMemoryResourcesStore : IResourceStore
Inheritance
InMemoryResourcesStore
Implements
Inherited Members

Constructors

InMemoryResourcesStore(IEnumerable<IdentityResource>?, IEnumerable<ApiResource>?, IEnumerable<ApiScope>?)

A store over fixed lists of resources, copied when constructed.

public InMemoryResourcesStore(IEnumerable<IdentityResource>? identityResources = null, IEnumerable<ApiResource>? apiResources = null, IEnumerable<ApiScope>? apiScopes = null)

Parameters

identityResources IEnumerable<IdentityResource>

The identity resources, or null for none.

apiResources IEnumerable<ApiResource>

The API resources, or null for none.

apiScopes IEnumerable<ApiScope>

The API scopes, or null for none.

Exceptions

ArgumentException

Two resources of the same kind share a name.

Methods

FindApiResourcesByNameAsync(IEnumerable<string>, CancellationToken)

Gets API resources by resource name.

public Task<IEnumerable<ApiResource>> FindApiResourcesByNameAsync(IEnumerable<string> apiResourceNames, CancellationToken cancellationToken = default)

Parameters

apiResourceNames IEnumerable<string>
cancellationToken CancellationToken

Returns

Task<IEnumerable<ApiResource>>

FindApiResourcesByScopeNameAsync(IEnumerable<string>, CancellationToken)

Gets API resources that claim any of the given scope names.

public Task<IEnumerable<ApiResource>> FindApiResourcesByScopeNameAsync(IEnumerable<string> scopeNames, CancellationToken cancellationToken = default)

Parameters

scopeNames IEnumerable<string>
cancellationToken CancellationToken

Returns

Task<IEnumerable<ApiResource>>

FindApiScopesByNameAsync(IEnumerable<string>, CancellationToken)

Gets API scopes by scope name.

public Task<IEnumerable<ApiScope>> FindApiScopesByNameAsync(IEnumerable<string> scopeNames, CancellationToken cancellationToken = default)

Parameters

scopeNames IEnumerable<string>
cancellationToken CancellationToken

Returns

Task<IEnumerable<ApiScope>>

FindIdentityResourcesByScopeNameAsync(IEnumerable<string>, CancellationToken)

Gets identity resources by scope name.

public Task<IEnumerable<IdentityResource>> FindIdentityResourcesByScopeNameAsync(IEnumerable<string> scopeNames, CancellationToken cancellationToken = default)

Parameters

scopeNames IEnumerable<string>
cancellationToken CancellationToken

Returns

Task<IEnumerable<IdentityResource>>

GetAllResourcesAsync(CancellationToken)

Gets all resources.

public Task<Resources> GetAllResourcesAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<Resources>