Skip to main content

Flask Authorization for Pandas!

Project description

**Flask-Authorization-Panda is a Flask extension that provides decorators
for various authentication methods for RESTful web services.

Currently, only HTTP Basic Authentication is supported. **

Usage
-----

>>> from flask.ext.flask_authorization_panda import basic_auth

During app initialization, store your required username/password in
the config attribute::

app = Flask(__name__)
app.config['basic_auth_credentials'] = dict(username='admin',
password='secret')


Finally, simple apply the @basic_auth decorator to methods which you
want to require HTTP Basic Auth::

>>> @app.route('/')
>>> @basic_auth
>>> def hello_world():
>>> return jsonify({"statusCode": 200, "message": "Ok"})

This will result in all calls against the decorated method to (1) check for
for credentials on the request.authorization object and (2) verify that
they match the contents of app.config['basic_auth_credentials]'

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

Flask-Authorization-Panda-0.3.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file Flask-Authorization-Panda-0.3.tar.gz.

File metadata

File hashes

Hashes for Flask-Authorization-Panda-0.3.tar.gz
Algorithm Hash digest
SHA256 1cdd57f281781c294e6cf45e192267c8aa96d5f5e39ca4583ca231a1cb00bc0f
MD5 ccd0753468defade28da074ddb1ce967
BLAKE2b-256 605a62ab32f60c708f8b1172a095b9cfa1830628323fb4c62e9817d84db55d6e

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