SPYC-Login Python Backend SDK
Project description
#Initialization
login = SPYCLogin() login.init_app(app)
#Set login_handler
@SPYCLogin.session_controller def set_user(identity=None): if not identity: email = 'visitor@unknown.com' role = 'public' if identity: email = identity['email'] role = identity['role'] session['email'] = email session['role'] = role session['login'] = email.endswith('@school.pyc.edu.hk')
#Login Usage
https://localhost/login?redirect=https://frontend.com
#Required Env
SPYC_LOGIN_URL = XXXXX
Remarks
- Must have index endpoint for default redirect
- session_controller must define session['login'] = boolean
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-SPYC-Login-0.0.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for Flask_SPYC_Login-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e19b2bda35918b7b4b2f11f62f10cb0c598b3db89a4c5bfe18bad4de636cd6e6 |
|
MD5 | 8b705c88f907bc59aed886c952ac82bb |
|
BLAKE2b-256 | ff6840da9aef83d86b8f33ad0b44ed7484416f9a32f96f0da2ff03617242ee59 |