Skip to content

Auth module.

A module to handle tokens.

This module is responsible for token responses, signing and decoding. For more control on JWE duration, you can set JWE_SECRET with your own secret.

Functions
  • decrypt_jwe(token) (dict) Decode the token.</>
  • encrypt_jwe(expiry_seconds, **token_attrs) (dict) Sign a paylod and return the signed token.</>
  • token_response(token) (dict) Returns a token response for a given token.</>

A module to bear JWE tokens.

This module is responsible for defining a JWE beared classs to be used in fastapi.

Classes