[][src]Module rowdy::token

Authentication token structs, and methods

This module provides the Token struct which encapsulates a JSON Web Token or JWT. Clients will pass the encapsulated JWT to services that require it. The JWT should be considered opaque to clients. The Token struct contains enough information for the client to act on, including expiry times.

Structs

Configuration

Token configuration. Usually deserialized as part of crate::Configuration from JSON for use.

Keys

Keys prepared in a form directly usable for cryptographic operations. This prevents us from having to repeatedly read keys from the file system. Users should prepare the keys from Configuration using Configuration::keys() and then use this struct to retrieve keys from instead of the functions from Secret.

RefreshToken

A Refresh Token containing the payload (called refresh payload) used by an authenticator to issue new access tokens without needing the user to re-authenticate.

RefreshTokenConfiguration

Configuration for Refresh Tokens

Token

A token that will be serialized into JSON and passed to clients. This encapsulates a JSON Web Token or JWT. Clients will pass the encapsulated JWT to services that require it. The JWT should be considered opaque to clients. The Token struct contains enough information for the client to act on, including expiry times.

Enums

Error

Token errors

Secret

Secrets for use in signing and encrypting a JWT. This enum (de)serialized as an untagged enum variant.

Type Definitions

PrivateClaim

Private claims that will be included in the JWT.

RefreshTokenJWE

Convenient typedef for the type of the encrypted JWE wrapping RefreshTokenPayload. This is a JWE which contains a JWS that contains a JWT Claims set.

RefreshTokenPayload

Convenient typedef for the type of the Refresh Token Payload. This is a signed JWS which contains a JWT Claims set.

TokenGetterCorsOptions

A wrapper around cors::Options for options specific to the token retrival route