Skip to main content

Auth0 Authorization Middleware for The Falcon Web Framework

Project description

Falcon Auth0 Authorization Middleware

Auth0 Authorization Middleware for The Falcon Web Framework

Install

Install through pip via

$ pip install falcon-auth0

Usage

You will need to supply a Dictionary containing Auth0 settings. These configurations can be supplied in two different ways. For the average user, you can supply a Dictionary of String keys and String values, such as:

cfg = {
    'alg': ['RS256'],
    'audience': 'my.app.name.auth0.com/userinfo',
    'domain': 'my.app.name.auth0.com', # or 'https://my.app.name.auth0.com/'
    'jwks_uri': 'https://my.app.name.auth0.com/.well-known/jwks.json'
}

If your application has multiple environments (Development, Test, QA, User Acceptance, Production), you may supply a Dictionary of String environment keys and Dictionary values of String keys with String Values, such as:

cfg = {
    'dev': {
        'alg': ['RS256'],
        'audience': 'my.dev.environment.auth0.com/userinfo',
        'domain': 'my.dev.environment.auth0.com', # or 'https://my.dev.environment.auth0.com/'
        'jwks_uri': 'https://my.dev.environment.auth0.com/.well-known/jwks.json'
    },
    'test': {
        'alg': ['RS256'],
        'audience': 'my.test.environment.auth0.com/userinfo',
        'domain': 'my.test.environment.auth0.com', # or 'https://my.test.environment.auth0.com/'
        'jwks_uri': 'https://my.test.environment.auth0.com/.well-known/jwks.json'
    },
    'uat': {
        'alg': ['RS256'],
        'audience': 'my.uat.environment.auth0.com/userinfo',
        'domain': 'my.uat.environment.auth0.com', # or 'https://my.uat.environment.auth0.com/'
        'jwks_uri': 'https://my.uat.environment.auth0.com/.well-known/jwks.json'
    },
    'prod': {
        'alg': ['RS256'],
        'audience': 'my.prod.environment.auth0.com/userinfo',
        'domain': 'my.prod.environment.auth0.com', # or 'https://my.prod.environment.auth0.com/'
        'jwks_uri': 'https://my.prod.environment.auth0.com/.well-known/jwks.json'
    }
}

Once complete, you'll inject the middleware directly into Falcon's falcon.API([...,Auth0Middleware(cfg),...]).

Project details


Release history Release notifications

This version
History Node

1.0.9

History Node

1.0.8

History Node

1.0.7

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
falcon_auth0-1.0.9-py3-none-any.whl (8.2 kB) Copy SHA256 hash SHA256 Wheel py3 May 9, 2018
falcon_auth0-1.0.9.tar.gz (8.6 kB) Copy SHA256 hash SHA256 Source None May 9, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page