Issue a Token and authenticate with it #80
Notifications
Due Date
No due date set.
Blocks
Depends on
#81 Revoke your own Token through the API
bobby/hapi
#82 Token expiry and `--no-expiry` for Bots
bobby/hapi
#85 Household Assets for members
bobby/hapi
#92 List Bots
bobby/hapi
#151 Request, pool, and auth metrics
bobby/hapi
Reference: bobby/hapi#80
Reference in new issue
Block a user
Part of #73 (spec: #72)
What to build
The Owner issues a Token with
hapi token issue <principal>, which printshapi_<public-id>_<secret>once. A Person uses it as a bearer Token and lists their own Tokens withGET /v1/tokens. Secrets (256-bit) are stored only as SHA-256 and looked up on every request. Every Token failure gets the same401.Acceptance criteria
hapi token issueprints the Token once and stores only its hashGET /v1/tokenswith a valid Token lists only the caller's Tokens (id, public id, created, expires, last used; never secrets or hashes), paginated401problem withWWW-Authenticate: Bearerkind = api_token