DatabaseDapperMaticKeyRepository
Namespace: MJCZone.DapperMatic.AspNetCore.Repositories
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
Keeps API keys in a database table, one row each (their secrets only as hashes): every instance of the application reads the same ones. The table is created when first used.
Inheritance
Implemented Interfaces:
public
Contents
Constructors (1) | Methods (9)
Constructors
DatabaseDapperMaticKeyRepository
Initializes a new instance of the DatabaseDapperMaticKeyRepository class.
csharp
DatabaseDapperMaticKeyRepository(
string provider,
string connectionString,
IDbConnectionFactory connectionFactory,
string schemaName,
string tableName)Parameters
- provider (string) - The database provider.
- connectionString (string) - The connection string.
- connectionFactory (IDbConnectionFactory) - The connection factory.
- schemaName (string) - The schema of the table, or null for the default one.
- tableName (string) - The table's name.
Methods
| Method | Summary |
|---|---|
| GetAsync | |
| ListAsync | |
| SaveAsync | |
| RevokeAsync | |
| TouchAsync | |
| GetType | |
| ToString | |
| Equals | |
| GetHashCode |
GetAsync
csharp
Task<DapperMaticApiKey?> GetAsync()Returns
Type: Task<DapperMaticApiKey?>
ListAsync
csharp
Task<IReadOnlyList<DapperMaticApiKey>> ListAsync()Returns
Type: Task<IReadOnlyList<DapperMaticApiKey>>
SaveAsync
csharp
Task SaveAsync()Returns
Type: Task
RevokeAsync
csharp
Task<bool> RevokeAsync()Returns
Type: Task<bool>
TouchAsync
csharp
Task TouchAsync()Returns
Type: Task
GetType
csharp
GetType()ToString
csharp
ToString()Equals
csharp
Equals()GetHashCode
csharp
GetHashCode()