Documentation
¶
Overview ¶
Package credential defines the Credential entity: the material used to prove an identity (password hash, passkey public key, API key hash, ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Credential struct {
ID string `json:"id"`
UserID string `json:"user_id"`
AccountID string `json:"account_id"`
Type Type `json:"type"`
Secret string `json:"secret"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
}
Credential is authentication material bound to an account.
Secret never holds plaintext secrets: for passwords it stores the encoded hash produced by password.Hasher; plugins must apply equivalent care.
func (*Credential) Active ¶
func (c *Credential) Active() bool
Active reports whether the credential has not been revoked.
Click to show internal directories.
Click to hide internal directories.