skip to navigation
skip to content

mbq.tokens 0.0.6

Installation

$ pip install mbq.tokens
🚀✨

Guaranteed fresh.

Getting started

from mbq import tokens

tokens.init(
    certificate=settings.FORMATTED_CERTIFICATE,
    allowed_audiences=set(settings.ALLOWED_AUDIENCES),
)

try:
    decoded_token = tokens.decode(token)
except tokens.TokenError:
    # will only ever raise TokenError
    logger.exception('Failed to decode token')

decoded_token = tokens.decode_header(request.META['HTTP_AUTHORIZATION'])
 
File Type Py Version Uploaded on Size
mbq.tokens-0.0.6.tar.gz (md5) Source 2017-12-02 5KB