nsmcp::BearerAuthenticator method grant (public)

 <instance of nsmcp::BearerAuthenticator[i]> grant token principal \
    permissions targets expires

Defined in /usr/local/ns/tcl/nsmcp/security.tcl

Grant a supplied bearer token to a principal and target set. Validate token length and expiry, then store the digest-indexed grant without retaining the token itself.

Parameters:
token (required)
High-entropy bearer token; only its digest is retained.
principal (required)
Authenticated principal identifier.
permissions (required)
Explicit permission names granted to the credential.
targets (required)
Server names which the credential may target.
expires (required)
Expiry timestamp in epoch seconds, or zero for no expiry.
Returns:
The hexadecimal token digest.

Testcases:
No testcase defined.
[ show source ]
Show another procedure: