Skip to content

DapperMaticStoredAccess ​

Namespace: MJCZone.DapperMatic.AspNetCore.Security

Assembly: MJCZone.DapperMatic.AspNetCore

Summary ​

The policies and tenants kept by DapperMatic, as last read from IDapperMaticAccessRepository: read again when AccessRefreshInterval has passed, so that every instance of the application sees another's changes, and at once after this instance's own.

sealed public

Contents ​

Constructors (1) | Methods (6) | Properties (4)

Constructors ​

DapperMaticStoredAccess ​

Initializes a new instance of the DapperMaticStoredAccess class.

csharp
DapperMaticStoredAccess(
    IDapperMaticAccessRepository repository,
    DapperMaticOptions} options,
    DapperMaticStoredAccess} logger)

Parameters ​

  • repository (IDapperMaticAccessRepository) - Where the policies and tenants are kept.
  • options (DapperMaticOptions}) - The options, with the refresh interval.
  • logger (DapperMaticStoredAccess}) - The logger, told of a kept policy that no longer works.

Methods ​

MethodSummary
RefreshAsyncReads the policies and tenants again if they were last read longer ago than the refresh interval.
InvalidateForgets what was read, so that the next request reads the policies and tenants again.
GetType
ToString
Equals
GetHashCode

RefreshAsync ​

Reads the policies and tenants again if they were last read longer ago than the refresh interval.

csharp
ValueTask RefreshAsync(CancellationToken cancellationToken)

Parameters ​

  • cancellationToken (CancellationToken) - The cancellation token.

Returns ​

Type: ValueTask

A task.

Invalidate ​

Forgets what was read, so that the next request reads the policies and tenants again.

csharp
void Invalidate()

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()

Properties ​

Policies ​

Gets the policies kept, as last read; each one validated.

Type: IReadOnlyList<DmPolicy>

Tenants ​

Gets the tenants kept, by id, as last read.

Type: IReadOnlyDictionary<string, DapperMaticTenantSettings>

Webhooks ​

Gets the webhooks kept, as last read, their secrets readable.

Type: IReadOnlyList<DapperMaticWebhook>

ServiceAccounts ​

Gets the service accounts kept, as last read.

Type: IReadOnlyList<DapperMaticServiceAccount>