cas for apistellar
Project description
CAS for apistellar
USEAGE
pip install apistellar-cas
from apistellar_cas import nit
# before app init
init()
...
from apistar import App
from apistellar import Controller, route, get
from apistellar_cas import login_required
@route("/", name="welcome")
class WelcomeController(Controller):
@get("/")
@login_required() # add this
def index(self, app: App) -> str:
return app.render_template('index.html')
# settings.py
CAS_SERVER = 'https://xxx.xxx.xxx'
CAS_LOGIN_ROUTE = '/xxxx'
CAS_AFTER_LOGIN = 'view:welcome:index'
CAS_USERNAME_SESSION_KEY = "username"
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
apistellar-cas-0.0.2.tar.gz
(4.5 kB
view details)
File details
Details for the file apistellar-cas-0.0.2.tar.gz
.
File metadata
- Download URL: apistellar-cas-0.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b45d436f6bc233ce58fb4f95792b42c968bcb1189231c25680be98e31f98d8f |
|
MD5 | 3e5f6f28aaf2d540bde856c04cc9a188 |
|
BLAKE2b-256 | b81b95cd730f2f940479f6bae7c5ad2b8ab65bcb1a52d4fb039d9c6c44a5fece |