Skip to main content

MBQ Tokens

Project description

https://img.shields.io/pypi/v/mbq.tokens.svg https://img.shields.io/pypi/l/mbq.tokens.svg https://img.shields.io/pypi/pyversions/mbq.tokens.svg https://img.shields.io/travis/managedbyq/mbq.tokens/master.svg

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'])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mbq.tokens-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file mbq.tokens-0.1.0.tar.gz.

File metadata

  • Download URL: mbq.tokens-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for mbq.tokens-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef556d158fe09857d0fe1f0b18dcf2e2bc1cecf9d51fd257fbf5464a77175f2f
MD5 d9997e0c85dfea4081ddf8c8ff943d0d
BLAKE2b-256 7db6513d5b251931445a2148cd5c610172de6f30a0ee49fa91130b272d4d0c67

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page