fictive.auth0.ext.werkzeug module

A middleware for injecting a bearer token to the Authorizatioin header

Classes

TokenInjectionMiddleware

injects a bearer token to the Authorizatioin header

class fictive.auth0.ext.werkzeug.TokenInjectionMiddleware(app: Callable, key: str, secret_key: str)[source]

Bases: object

injects a bearer token to the Authorizatioin header

looks for a token in a secure cookie or the query parameters and if found, sets the Authorization header before further processing the request

__init__(app: Callable, key: str, secret_key: str)[source]

Initialize self. See help(type(self)) for accurate signature.

save_token(token: Any, response: werkzeug.wrappers.response.Response)None[source]

saves the provided token in a secure cookie for future requests