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.
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
| Method | Summary |
|---|---|
| RefreshAsync | Reads the policies and tenants again if they were last read longer ago than the refresh interval. |
| Invalidate | Forgets 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.
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.
void Invalidate()GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
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>