DapperMaticApiKey
Namespace: MJCZone.DapperMatic.AspNetCore.Models
Assembly: MJCZone.DapperMatic.AspNetCore
Summary
An API key, as DapperMatic keeps it: its secret only as a hash (the key itself is shown once, when made).
sealed public
Contents
Constructors (1) | Methods (5) | Properties (12)
Constructors
DapperMaticApiKey
DapperMaticApiKey()Methods
IsLive
Tells whether the key signs in now.
bool IsLive(DateTimeOffset now)Parameters
- now (DateTimeOffset) - The time.
Returns
Type: bool
True unless revoked or expired.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()Properties
Id
Gets or sets the key's id: the public part of the key, which lists, logs and audits name it by.
Type: string
SecretHash
Gets or sets the SHA-256 of the key's secret, as hexadecimal.
Type: string
Name
Gets or sets the key's name, which says what it is for.
Type: string
Kind
Gets or sets whom the key signs in as.
Type: DapperMaticKeyKind
Owner
Gets or sets the key's owner: a service account's name, or a person's user id.
Type: string
Tenant
Gets or sets the tenant the key acts in, or null for none.
Type: string?
Limits
Gets the most the key may do: policies (of no roles) that, together with its owner's, decide what its caller may do. Empty for as much as its owner.
Type: List<DmPolicy>
ExpiresAt
Gets or sets when the key stops working, or null for never.
Type: DateTimeOffset?
CreatedAt
Gets or sets when the key was made.
Type: DateTimeOffset
CreatedBy
Gets or sets who made it.
Type: string?
LastUsedAt
Gets or sets when it was last used (to within a minute), or null for never.
Type: DateTimeOffset?
RevokedAt
Gets or sets when it was revoked, or null.
Type: DateTimeOffset?