Skip to main content

Flask extension for authentication and authorization

Project description

Flask-AA

Flask extension for authentication and authorization.

It can be used as an alternative for Flask-Login.

Apart from base functionality for user session management it provides also routes for login (it renders auth/login.html template) and logout. Users can be checked against external TACACS+ server (the Flask app config should have TACACS_SERVER and TACACS_SECRET_KEY keys).

There is also a UserMixin model class with the following fields (username, remote, password_hash, first_name, last_name, email, active, admin, created, last_login).

Installation

$ pip install Flask-AA

Usage

First create the auth object:

from flask_auth import Auth
auth = Auth()

Then initialize it using init_app method:

auth.init_app(app, db, User, wtf)
# app is your Flask app instance
# db is your Flask-Alchemist instance
# User is your User model
# wtf is your Flask-Formist instance for handling forms

License

Flask-AA was created by Rafal Padkowski. It is licensed under the terms of the MIT license.

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_aa-0.1.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

flask_aa-0.1.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

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