Metadata-Version: 2.1
Name: falcon-auth0
Version: 1.0.3
Summary: Auth0 Authorization Middleware for The Falcon Web Framework
Home-page: https://github.com/mcculloh213/alchemist-stack
Author: H.D. "Chip" McCullough IV
Author-email: hdmccullough.work@gmail.com
License: MIT
Project-URL: Documentation, https://github.com/mcculloh213/falcon-auth0
Project-URL: Source, https://github.com/mcculloh213/falcon-auth0
Project-URL: Issue Tracker, https://github.com/mcculloh213/falcon-auth0/issues
Description-Content-Type: text/markdown
Keywords: falcon authorization auth0
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3
Requires-Dist: falcon
Requires-Dist: python-jose-cryptodome
Requires-Dist: six

# Falcon Auth0 Authorization Middleware
Auth0 Authorization Middleware for The Falcon Web Framework

# Install
Install through pip via
```bash
$ 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:
```python
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:
```python
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),...])`.

