Show / Hide Table of Contents

Class ResourceStore

Inheritance
object
ResourceStore
Implements
IResourceStore
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.IdentityServer
Assembly: Volo.Abp.IdentityServer.Domain.dll
Syntax
public class ResourceStore : IResourceStore

Constructors

ResourceStore(IIdentityResourceRepository, IObjectMapper<AbpIdentityServerDomainModule>, IApiResourceRepository, IApiScopeRepository, IDistributedCache<IdentityResource>, IDistributedCache<ApiScope>, IDistributedCache<ApiResource>, IDistributedCache<IEnumerable<ApiResource>>, IDistributedCache<Resources>, IOptions<IdentityServerOptions>)

Declaration
public ResourceStore(IIdentityResourceRepository identityResourceRepository, IObjectMapper<AbpIdentityServerDomainModule> objectMapper, IApiResourceRepository apiResourceRepository, IApiScopeRepository apiScopeRepository, IDistributedCache<IdentityResource> identityResourceCache, IDistributedCache<ApiScope> apiScopeCache, IDistributedCache<ApiResource> apiResourceCache, IDistributedCache<IEnumerable<ApiResource>> apiResourcesCache, IDistributedCache<Resources> resourcesCache, IOptions<IdentityServerOptions> options)
Parameters
Type Name Description
IIdentityResourceRepository identityResourceRepository
IObjectMapper<AbpIdentityServerDomainModule> objectMapper
IApiResourceRepository apiResourceRepository
IApiScopeRepository apiScopeRepository
IDistributedCache<IdentityResource> identityResourceCache
IDistributedCache<ApiScope> apiScopeCache
IDistributedCache<ApiResource> apiResourceCache
IDistributedCache<IEnumerable<ApiResource>> apiResourcesCache
IDistributedCache<Resources> resourcesCache
IOptions<IdentityServerOptions> options

Fields

AllResourcesKey

Declaration
public const string AllResourcesKey = "AllResources"
Field Value
Type Description
string

ApiResourceNameCacheKeyPrefix

Declaration
public const string ApiResourceNameCacheKeyPrefix = "ApiResourceName_"
Field Value
Type Description
string

ApiResourceScopeNameCacheKeyPrefix

Declaration
public const string ApiResourceScopeNameCacheKeyPrefix = "ApiResourceScopeName_"
Field Value
Type Description
string

Properties

ApiResourceCache

Declaration
protected IDistributedCache<ApiResource> ApiResourceCache { get; }
Property Value
Type Description
IDistributedCache<ApiResource>

ApiResourceRepository

Declaration
protected IApiResourceRepository ApiResourceRepository { get; }
Property Value
Type Description
IApiResourceRepository

ApiResourcesCache

Declaration
protected IDistributedCache<IEnumerable<ApiResource>> ApiResourcesCache { get; }
Property Value
Type Description
IDistributedCache<IEnumerable<ApiResource>>

ApiScopeCache

Declaration
protected IDistributedCache<ApiScope> ApiScopeCache { get; }
Property Value
Type Description
IDistributedCache<ApiScope>

ApiScopeRepository

Declaration
protected IApiScopeRepository ApiScopeRepository { get; }
Property Value
Type Description
IApiScopeRepository

IdentityResourceCache

Declaration
protected IDistributedCache<IdentityResource> IdentityResourceCache { get; }
Property Value
Type Description
IDistributedCache<IdentityResource>

IdentityResourceRepository

Declaration
protected IIdentityResourceRepository IdentityResourceRepository { get; }
Property Value
Type Description
IIdentityResourceRepository

ObjectMapper

Declaration
protected IObjectMapper<AbpIdentityServerDomainModule> ObjectMapper { get; }
Property Value
Type Description
IObjectMapper<AbpIdentityServerDomainModule>

Options

Declaration
protected IdentityServerOptions Options { get; }
Property Value
Type Description
IdentityServerOptions

ResourcesCache

Declaration
protected IDistributedCache<Resources> ResourcesCache { get; }
Property Value
Type Description
IDistributedCache<Resources>

Methods

AddCachePrefix(IEnumerable<string>, string)

Declaration
protected virtual IEnumerable<string> AddCachePrefix(IEnumerable<string> keys, string prefix)
Parameters
Type Name Description
IEnumerable<string> keys
string prefix
Returns
Type Description
IEnumerable<string>

AddCachePrefix(string, string)

Declaration
protected virtual string AddCachePrefix(string key, string prefix)
Parameters
Type Name Description
string key
string prefix
Returns
Type Description
string

FindApiResourcesByNameAsync(IEnumerable<string>)

Declaration
public virtual Task<IEnumerable<ApiResource>> FindApiResourcesByNameAsync(IEnumerable<string> apiResourceNames)
Parameters
Type Name Description
IEnumerable<string> apiResourceNames
Returns
Type Description
Task<IEnumerable<ApiResource>>

FindApiResourcesByScopeNameAsync(IEnumerable<string>)

Declaration
public virtual Task<IEnumerable<ApiResource>> FindApiResourcesByScopeNameAsync(IEnumerable<string> scopeNames)
Parameters
Type Name Description
IEnumerable<string> scopeNames
Returns
Type Description
Task<IEnumerable<ApiResource>>

FindApiScopesByNameAsync(IEnumerable<string>)

Declaration
public virtual Task<IEnumerable<ApiScope>> FindApiScopesByNameAsync(IEnumerable<string> scopeNames)
Parameters
Type Name Description
IEnumerable<string> scopeNames
Returns
Type Description
Task<IEnumerable<ApiScope>>

FindIdentityResourcesByScopeNameAsync(IEnumerable<string>)

Declaration
public virtual Task<IEnumerable<IdentityResource>> FindIdentityResourcesByScopeNameAsync(IEnumerable<string> scopeNames)
Parameters
Type Name Description
IEnumerable<string> scopeNames
Returns
Type Description
Task<IEnumerable<IdentityResource>>

GetAllResourcesAsync()

Declaration
public virtual Task<Resources> GetAllResourcesAsync()
Returns
Type Description
Task<Resources>

GetCacheItemsAsync<TEntity, TModel>(IDistributedCache<TModel>, IEnumerable<string>, Func<string[], Task<List<TEntity>>>, Func<List<TModel>, string, List<IEnumerable<KeyValuePair<string, TModel>>>>, string)

Declaration
protected virtual Task<IEnumerable<TModel>> GetCacheItemsAsync<TEntity, TModel>(IDistributedCache<TModel> cache, IEnumerable<string> keys, Func<string[], Task<List<TEntity>>> entityFactory, Func<List<TModel>, string, List<IEnumerable<KeyValuePair<string, TModel>>>> cacheItemsFactory, string cacheKeyPrefix = null) where TModel : class
Parameters
Type Name Description
IDistributedCache<TModel> cache
IEnumerable<string> keys
Func<string[], Task<List<TEntity>>> entityFactory
Func<List<TModel>, string, List<IEnumerable<KeyValuePair<string, TModel>>>> cacheItemsFactory
string cacheKeyPrefix
Returns
Type Description
Task<IEnumerable<TModel>>
Type Parameters
Name Description
TEntity
TModel

RemoveCachePrefix(IEnumerable<string>, string)

Declaration
protected virtual IEnumerable<string> RemoveCachePrefix(IEnumerable<string> keys, string prefix)
Parameters
Type Name Description
IEnumerable<string> keys
string prefix
Returns
Type Description
IEnumerable<string>

RemoveCachePrefix(string, string)

Declaration
protected virtual string RemoveCachePrefix(string key, string prefix)
Parameters
Type Name Description
string key
string prefix
Returns
Type Description
string

Implements

IdentityServer4.Stores.IResourceStore

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform