Skip to content

FileDapperMaticKeyRepository ​

Namespace: MJCZone.DapperMatic.AspNetCore.Repositories

Assembly: MJCZone.DapperMatic.AspNetCore

Summary ​

Keeps API keys in a JSON file (their secrets only as hashes): for a single instance that keeps its access in a file.

Inheritance ​

Implemented Interfaces:

public

Contents ​

Constructors (1) | Methods (9)

Constructors ​

FileDapperMaticKeyRepository ​

Initializes a new instance of the FileDapperMaticKeyRepository class.

csharp
FileDapperMaticKeyRepository(string path)

Parameters ​

  • path (string) - The file; created when first written.

Methods ​

MethodSummary
GetAsync
ListAsync
SaveAsync
RevokeAsync
TouchAsync
GetType
ToString
Equals
GetHashCode

GetAsync ​

csharp
Task<DapperMaticApiKey?> GetAsync()

Returns ​

Type: Task<DapperMaticApiKey?>

ListAsync ​

csharp
Task&lt;IReadOnlyList&lt;DapperMaticApiKey&gt;&gt; ListAsync()

Returns ​

Type: Task<IReadOnlyList<DapperMaticApiKey>>

SaveAsync ​

csharp
Task SaveAsync()

Returns ​

Type: Task

RevokeAsync ​

csharp
Task&lt;bool&gt; RevokeAsync()

Returns ​

Type: Task&lt;bool&gt;

TouchAsync ​

csharp
Task TouchAsync()

Returns ​

Type: Task

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()