Skip to main content

Module admin

Module admin 

Source
Expand description

The token subcommands. A raw token exists only in mint’s return value; every other command works on its hash.

Structs§

Credential
One row of token list.

Constants§

SECONDS_PER_DAY 🔒
SHORT_HASH_LENGTH 🔒

Functions§

check_grantable 🔒
public is everyone’s already, and an invalid name could never match a directory.
grant
Granting a directory twice is not an error.
insert_grant 🔒
list
Newest first.
mint
Stores the hash and grants and returns the raw token, which nothing keeps.
resolve_hash
A raw pcn_… token, a full hash, or a prefix of one that matches exactly one credential.
revoke
Keeps the row, so token list still shows it.
short_hash
Identifies a credential without looking like a usable one.
ungrant
Effective on the next request, since grants are read per request.