Skip to main content

Module auth

Module auth 

Source
Expand description

Bearer auth and User Signup.

Enums§

BearerAuthenticator
A BearerAuthenticator (1) stores existing fresh auth tokens and (2) authenticates and fetches new auth tokens when they expire.

Constants§

DEFAULT_USER_TOKEN_LIFETIME_SECS

Functions§

do_bearer_auth
Create a new short-lived BearerAuthRequest, sign it, and send the request. Returns the TokenWithExpiration if the auth request succeeds.
token_needs_refresh
Returns true if we should refresh the token (i.e., it’s expired or about to expire).