DapperMaticClaims
Namespace: MJCZone.DapperMatic.AspNetCore.Authentication
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
The claims and authentication types of the callers DapperMatic signs in itself: by an API key, a built-in account, a JWT it issued, a stream's ticket. Such a caller names its tenant itself (Tenant), and the tenancy sources are not read for it: a request cannot choose another. The claim is read only on identities of DapperMatic's own authentication types, which only DapperMatic's handlers make, so a token from elsewhere carrying it is not believed.
static public
Contents
Methods
| Method | Summary |
|---|---|
| IsDapperMatics | Tells whether an identity is one DapperMatic signed in itself. |
| TryGetTenant | Reads the tenant a caller DapperMatic signed in names: the Tenant of its DapperMatic identities.... |
| ByKey | Tells whether a caller signed in with an API key: such a caller cannot make keys, change accounts, i... |
| ByTicket | Tells whether a caller signed in with a ticket: such a caller cannot get another. |
| GetType | |
| ToString | |
| Equals | |
| GetHashCode |
IsDapperMatics
Tells whether an identity is one DapperMatic signed in itself.
bool IsDapperMatics(ClaimsIdentity identity)Parameters
- identity (ClaimsIdentity) - The identity.
Returns
Type: bool
True for an API key's, a built-in account's, a DapperMatic JWT's or a ticket's.
TryGetTenant
Reads the tenant a caller DapperMatic signed in names: the Tenant of its DapperMatic identities.
TryGetTenant(ClaimsPrincipal user, string tenant)Parameters
- user (ClaimsPrincipal) - The caller.
- tenant (string) - The tenant, or null for none (a platform caller).
Returns
True if DapperMatic signed the caller in, whatever their tenant; false for anyone else.
ByKey
Tells whether a caller signed in with an API key: such a caller cannot make keys, change accounts, invite or grant.
bool ByKey(ClaimsPrincipal user)Parameters
- user (ClaimsPrincipal) - The caller.
Returns
Type: bool
True if one of their identities is an API key's.
ByTicket
Tells whether a caller signed in with a ticket: such a caller cannot get another.
bool ByTicket(ClaimsPrincipal user)Parameters
- user (ClaimsPrincipal) - The caller.
Returns
Type: bool
True if one of their identities is a ticket's.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Fields
AuthenticationTypePrefix
What the authentication types of DapperMatic's own identities begin with.
Type: object
ApiKeyAuthenticationType
The authentication type of a caller signed in by an API key.
Type: object
AccountAuthenticationType
The authentication type of a caller signed in to a built-in account: by its token (a JWT too), or a cookie.
Type: object
TicketAuthenticationType
The authentication type of a stream's caller, signed in by a ticket.
Type: object
Tenant
The caller's tenant, when they act in one.
Type: object
Key
The id of the API key the caller signed in with.
Type: object
KeyKind
The kind of that key: <c>service</c> or <c>personal</c>.
Type: object
ServiceAccount
The service account a service key is of.
Type: object
Membership
The membership a built-in account acts in a tenant by.
Type: object
Grant
The grant a platform user acts in a tenant under, when they do.
Type: object
GrantedBy
Who made that grant.
Type: object
Session
The sign-in session a built-in account's token or cookie is of: signing out ends it.
Type: object