Flask-bluelogin
Flask-bluelogin provides user session management for Flask by blueprint component
It use flask-login module
Installation
pip install flask-bluelogin
Or
git clone https://github.com/fraoustin/flask-bluelogin.git cd flask-bluelogin python setup.py install
Usage
from flask import Flask, request, current_app
from flask_bluelogin import BlueLogin, User, Users, check_login
import logging
app = Flask(__name__)
app.secret_key = 'super secret string'
app.register_blueprint(BlueLogin(url_prefix="/api", ui_testing=True))
User(id="fred", password="fred").save()
Users().add_user(User(id='admin', password='passadmin', groups=['admin',]))
Users().add_user(User(id='test', password='passtest'))
@app.route("/")
def hello():
return "Hello World!"
@app.route("/check")
@check_login()
def check():
return "You are authentified"
@app.route("/admin")
@check_login("admin")
def admin():
return "you are admin"
if __name__ == "__main__":
app.run(port=8080) #TODO
You can use BlueLogin.add_check_login for add control login on endpoint
You can use ui for testing on http://127.0.0.1:8080/ui
Feature
V. 0.2.7
hotfix on path ui
V. 0.2.5
add ws current
V. 0.2.4
hotfix requirement
V. 0.2.2
add param url_prefix in blueprint
V. 0.2.1
optimize import from module
V. 0.2.0
add dynamic decorator check_login for route other module
generate secret_key
add function add_group in User
add functionnality Users as generic
add function save in User
add property active for user
V. 0.1.0
init
add group management
add blueprint module
Metadata
Release files for flask-bluelogin 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flask-bluelogin-0.2.7.tar.gz | 965.5 kB | Without provenance | Details for flask-bluelogin-0.2.7.tar.gz |
Release files / flask-bluelogin-0.2.7.tar.gz
| Download URL | flask-bluelogin-0.2.7.tar.gz |
|---|---|
| Size | 965.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e0eeeb00c857f59eaf72efbc23d79f117b58f276a9f5845bac3a922d09c1012
|
|
BLAKE2b-256 checksum How to use checksums |
7bc0650c9bfbd9573c821960778b47e7b4f72f6bcf9f3a1939f2ca5f4ac23f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flask-bluelogin 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.