DapperMaticAccess
Namespace: MJCZone.DapperMatic.AspNetCore.Security
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
Builds callers' sessions (DapperMaticCallerSession): who is calling, for which tenant, with which values, from a request and the tenancy settings; and holds an operation to the caller's tenant.
sealed public
Contents
Constructors (1) | Methods (6)
Constructors
DapperMaticAccess
Initializes a new instance of the DapperMaticAccess class.
DapperMaticAccess(DapperMaticOptions} options, DapperMaticStoredAccess stored)Parameters
- options (DapperMaticOptions}) - The DapperMatic options, with the tenancy settings.
- stored (DapperMaticStoredAccess) - The tenants kept by DapperMatic, which win over those of configuration; null for none.
Methods
| Method | Summary |
|---|---|
| GetSessionAsync | Gets a request's session: the one built for it, or one built now and kept for the rest of the reques... |
| BuildAsync | Builds a session for the caller of a request, User: its tenant, found by the tenancy sources and c... |
| GetType | |
| ToString | |
| Equals | |
| GetHashCode |
GetSessionAsync
Gets a request's session: the one built for it, or one built now and kept for the rest of the request. A session built before the request's caller was known (before authentication ran) is built again for them.
ValueTask<DapperMaticCallerSession> GetSessionAsync(
HttpContext http,
CancellationToken cancellationToken)Parameters
- http (HttpContext) - The request.
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: ValueTask<DapperMaticCallerSession>
The session.
BuildAsync
Builds a session for the caller of a request, User: its tenant, found by the tenancy sources and completed by its settings, values and lookups. A socket's caller signs in after the request that opened it: the session is built once the request's user is set to them.
ValueTask<DapperMaticCallerSession> BuildAsync(
HttpContext http,
CancellationToken cancellationToken)Parameters
- http (HttpContext) - The request, with its caller.
- cancellationToken (CancellationToken) - The cancellation token.
Returns
Type: ValueTask<DapperMaticCallerSession>
The session.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()