Skip to main content

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

  1. Must have index endpoint for default redirect
  2. session_controller must define session['login'] = boolean

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-SPYC-Login-0.0.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

Flask_SPYC_Login-0.0.0-py3-none-any.whl (3.8 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