auth::token::redeem (public)
auth::token::redeem -purpose purpose -token token -callback callback
Defined in packages/acs-authentication/tcl/token-procs.tcl
Redeem a token for the expected purpose. The callback is a trusted command prefix. It receives the user ID and stored context as its final arguments and runs in the token transaction. It must enforce the operation's authorization rules. A normal return consumes the token. An error rolls back the operation and leaves the token available to retry until expiry. External side effects belong after commit.
- Switches:
- -purpose (required)
- -token (required)
- -callback (required)
- Returns:
- A dictionary with status invalid, or status redeemed and the callback result.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.