Show / Hide Table of Contents

# Class OpenIddictAuthorizationCache<TAuthorization>

Provides methods allowing to cache authorizations after retrieving them from the store.

##### Inheritance

System.Object
OpenIddictAuthorizationCache<TAuthorization>

##### Implements

System.IDisposable

###### Namespace: OpenIddict.Core

###### Assembly: cs.temp.dll.dll

##### Syntax

    public class OpenIddictAuthorizationCache<TAuthorization> : IOpenIddictAuthorizationCache<TAuthorization>, IDisposable where TAuthorization : class

##### Type Parameters

Name | Description
--- | ---
TAuthorization | The type of the Authorization entity.

### Constructors

#### OpenIddictAuthorizationCache(IOptionsMonitor<OpenIddictCoreOptions>, IOpenIddictAuthorizationStoreResolver)

##### Declaration

    public OpenIddictAuthorizationCache(IOptionsMonitor<OpenIddictCoreOptions> options, IOpenIddictAuthorizationStoreResolver resolver)

##### Parameters

Type | Name | Description
--- | --- | ---
IOptionsMonitor<OpenIddictCoreOptions> | options |
IOpenIddictAuthorizationStoreResolver | resolver |

### Methods

#### AddAsync(TAuthorization, CancellationToken)

##### Declaration

    public ValueTask AddAsync(TAuthorization authorization, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
TAuthorization | authorization |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask |

#### Dispose()

##### Declaration

    public void Dispose()

#### FindAsync(String, String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TAuthorization> |

#### FindAsync(String, String, String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, string status, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
System.String | status |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TAuthorization> |

#### FindAsync(String, String, String, String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, string status, string type, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
System.String | status |
System.String | type |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TAuthorization> |

#### FindAsync(String, String, String, String, ImmutableArray<String>, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TAuthorization> FindAsync(string subject, string client, string status, string type, ImmutableArray<string> scopes, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | subject |
System.String | client |
System.String | status |
System.String | type |
ImmutableArray<System.String> | scopes |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TAuthorization> |

#### FindByApplicationIdAsync(String, CancellationToken)

##### Declaration

    public IAsyncEnumerable<TAuthorization> FindByApplicationIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
IAsyncEnumerable<TAuthorization> |

#### FindByIdAsync(String, CancellationToken)

##### Declaration

    public ValueTask<TAuthorization> FindByIdAsync(string identifier, CancellationToken cancellationToken)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | identifier |
CancellationToken | cancellationToken |

##### Returns

Type | Description
--- | ---
ValueTask<TAuthorization> |

### Implements

System.IDisposable