Skip to main content

No project description provided

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(
    public_key=settings.PUBLIC_KEY,
    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.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

mbq.tokens-0.0.1-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: mbq.tokens-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mbq.tokens-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4ad9a50eed150c806274d74764c8320cc8f03bf52d256f873847e250b4018c8d
MD5 e19aecae183644e8c76badd4e76d7a74
BLAKE2b-256 d4db4cca73628bec399261e352cf6b640a0be895af02a43fb22ca0d20969445a

See more details on using hashes here.

File details

Details for the file mbq.tokens-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mbq.tokens-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b052bab50c085c4c5f9401891ef526f6f1f4e5ddfda5409053ee1ecc3226a1cc
MD5 b6a133d48e708b4e087d0ea0528b6c59
BLAKE2b-256 a3ac2023bdad6f1a8660f4583cf6ca56edc8a9985f88bf66be1f3eca51aeb84d

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