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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file flask_aa-0.1.0.tar.gz.

File metadata

  • Download URL: flask_aa-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.0-79-generic

File hashes

Hashes for flask_aa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b79571612648f5fe160b1887d65012daec683ff0a852c92796e1297f5a98c2a7
MD5 8f40393ab9bbb1e1ae1f13c2b51dad43
BLAKE2b-256 17bbaeda461d4db23281f3a6d1550ff1e7f05e90940a6a7d45052aa665ed11e0

See more details on using hashes here.

File details

Details for the file flask_aa-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flask_aa-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/5.15.0-79-generic

File hashes

Hashes for flask_aa-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54fd6f1e3dd101d841ce01b4be981a0d9c513ea111a0adbe9a1d4fc407695d27
MD5 ac94a81a12282a9111b92b3e19e20e94
BLAKE2b-256 6a33f4fbe840a3e6fd970a7759507f0ea7c4d4dea03254b7e4dd153039d8b659

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page