#[non_exhaustive]pub struct UserTokenRecord {
pub jti: String,
pub user_id: UserId,
pub name: String,
pub scopes: Vec<Scope>,
pub aud: String,
pub created_at: i64,
pub last_used_at: Option<i64>,
pub expires_at: i64,
pub revoked: bool,
}Expand description
One user API token’s metadata — everything except the secret.
jti is the token’s own id: the value baked into the signed claim, the key
the revocation set is keyed on, and the {id} in
DELETE /me/tokens/{id}. One id, three places, no mapping table.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.jti: StringThe minted token’s jti — also the public id of this row.
user_id: UserIdOwner. Every read path filters on this; a jti alone is never enough
to act on a row.
name: StringHuman label the user chose (“ci-deploy”, “laptop”). Opaque to cheers.
scopes: Vec<Scope>The scopes actually minted into the token — already intersected with the caller’s entitlement, so this is what the token can do, not what was asked for.
aud: StringThe audience the token was minted for. Grants are keyed
(principal, aud), so a token is never audience-portable.
created_at: i64§last_used_at: Option<i64>Last observed use, when a resource server reports one. See the module docs — cheers itself never writes this.
expires_at: i64§revoked: boolSet by UserTokenStore::mark_revoked. The signed token is killed by
the revocation set; this is the half that makes the kill visible on
GET /me/tokens.