type

APIKey

A newly minted API key and its one-time secret.

Properties

PropertyTypeDescription
IDstringThe stable revocable key identifier.
NamestringThe author-facing key label.
KeystringThe raw bearer secret, shown only at creation.
CreatedAttime.TimeWhen the key was created.
ExpiresAttime.TimeWhen the key expires, or the zero time when it does not.

How it works

Key is a bearer secret. Persist it in the caller’s secret store because Ridu cannot display it again.

Full signature

type APIKey struct { ID string Name string Key string CreatedAt time.Time ExpiresAt time.Time }

Source core/auth.go:63