Skip to content

A module to bear JWE tokens.

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

Classes
Bases
fastapi.security.http.HTTPBearer fastapi.security.http.HTTPBase fastapi.security.base.SecurityBase

A class to define a JWE Token Bearer.

Methods
  • __call__(request) (str) Define behaviour when the class is called.</>
  • verify_jwe(jwe_token) (bool) Verify a JWE token.</>
method

__call__(request)

Define behaviour when the class is called.

Parameters
  • request (Request) The request to be checked.
Returns (str)

A credential if it's valid.

Raises
  • HTTPException If there's any issue with the credentials.
method

verify_jwe(jwe_token)

Verify a JWE token.

Parameters
  • jwe_token (str) JWE token to be verified.
Returns (bool)

A boolean showing if the token is valid or not.