Interface IOpenIddictAuthorizationCache<TAuthorization>
Provides methods allowing to cache authorizations after retrieving them from the store.
Namespace: OpenIddict.Abstractions
Assembly: cs.temp.dll.dll
Syntax
public interface IOpenIddictAuthorizationCache<TAuthorization>
where TAuthorization : class
Type Parameters
Name | Description |
---|---|
TAuthorization | The type of the Authorization entity. |
Methods
AddAsync(TAuthorization, CancellationToken)
Add the specified authorization to the cache.
Declaration
ValueTask AddAsync(TAuthorization authorization, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TAuthorization | authorization | The authorization to add to the cache. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask | A |
FindAsync(String, String, CancellationToken)
Retrieves the authorizations corresponding to the specified subject and associated with the application identifier.
Declaration
IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | subject | The subject associated with the authorization. |
System.String | client | The client associated with the authorization. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TAuthorization> | The authorizations corresponding to the subject/client. |
FindAsync(String, String, String, CancellationToken)
Retrieves the authorizations matching the specified parameters.
Declaration
IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, string status, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | subject | The subject associated with the authorization. |
System.String | client | The client associated with the authorization. |
System.String | status | The authorization status. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TAuthorization> | The authorizations corresponding to the criteria. |
FindAsync(String, String, String, String, CancellationToken)
Retrieves the authorizations matching the specified parameters.
Declaration
IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, string status, string type, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | subject | The subject associated with the authorization. |
System.String | client | The client associated with the authorization. |
System.String | status | The authorization status. |
System.String | type | The authorization type. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TAuthorization> | The authorizations corresponding to the criteria. |
FindAsync(String, String, String, String, ImmutableArray<String>, CancellationToken)
Retrieves the authorizations matching the specified parameters.
Declaration
IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, string status, string type, ImmutableArray<string> scopes, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | subject | The subject associated with the authorization. |
System.String | client | The client associated with the authorization. |
System.String | status | The authorization status. |
System.String | type | The authorization type. |
ImmutableArray<System.String> | scopes | The minimal scopes associated with the authorization. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TAuthorization> | The authorizations corresponding to the criteria. |
FindByApplicationIdAsync(String, CancellationToken)
Retrieves the list of authorizations corresponding to the specified application identifier.
Declaration
IAsyncEnumerable<TAuthorization> FindByApplicationIdAsync(string identifier, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | identifier | The application identifier associated with the authorizations. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TAuthorization> | The authorizations corresponding to the specified application. |
FindByIdAsync(String, CancellationToken)
Retrieves an authorization using its unique identifier.
Declaration
ValueTask<TAuthorization> FindByIdAsync(string identifier, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | identifier | The unique identifier associated with the authorization. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask<TAuthorization> | A |
FindBySubjectAsync(String, CancellationToken)
Retrieves all the authorizations corresponding to the specified subject.
Declaration
IAsyncEnumerable<TAuthorization> FindBySubjectAsync(string subject, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | subject | The subject associated with the authorization. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
IAsyncEnumerable<TAuthorization> | The authorizations corresponding to the specified subject. |
RemoveAsync(TAuthorization, CancellationToken)
Removes the specified authorization from the cache.
Declaration
ValueTask RemoveAsync(TAuthorization authorization, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
TAuthorization | authorization | The authorization to remove from the cache. |
CancellationToken | cancellationToken | The |
Returns
Type | Description |
---|---|
ValueTask | A |