Skip to main content

Module resource

Module resource 

Source
Expand description

The resource’s side: authenticating a signed request, minting resource tokens, and challenging for what is missing.

Structs§

Authenticated
A request whose signature verified, and the token it presented.
ResourceTokenParams
What a resource token asks the Person Server for. Build one with ResourceTokenParams::new.

Constants§

DEFAULT_RESOURCE_TOKEN_LIFETIME
A resource token’s default lifetime: the spec says it SHOULD NOT exceed five minutes.

Functions§

authenticate
Verify a request’s signature, then the token it presents in Signature-Key, as one of the accepted kinds, for resource (this server’s own identifier). What a resource does with every request.
challenge
The headers of a 401 asking for requirement.
resource_token
Mint a resource token for a requirement=auth-token challenge, addressed to the Person Server that issued the presented token, and carrying its sub, mission_s256 and tenant unchanged.