未提供项目描述
项目描述
Bottle-RAuth – 简短描述。
文档可在https://bottle-rauth.readthedocs.org/找到。带有文档增强和/或修复的拉取请求很棒,非常欢迎。
要求
python >= 2.6
安装
Bottle-RAuth 应使用pip安装
pip install bottle-rauth
使用
import bottle from bottle_rauth import RAuthPlugin app = bottle.Bottle() app.install(RAuthPlugin(github={ 'type': 'oauth2', 'client_id': 'e3e297bb9f506cbea557', 'client_secret': 'd113380beb8f1ed8a77b688e2b81b76c9be00d09', 'authorize_url': 'https://github.com/login/oauth/authorize', 'access_token_url': 'https://github.com/login/oauth/access_token', 'base_url': 'https://api.github.com/', })) @app.route('/') def index(): return '<a href="/github">Login with github</a>' @app.route('/github', provider='github') def github(rauth): info = rauth.get('user').json() info['token'] = rauth.access_token return info if __name__ == '__main__': app.run(port=5000)
错误跟踪器
如果您有任何建议、错误报告或不满,请向https://github.com/klen/bottle-rauth/issues的问题跟踪器报告
贡献
Bottle-RAuth的开发发生在:https://github.com/klen/bottle-rauth
贡献者
klen (Kirill Klenov)
许可证
许可协议BSD许可证。
项目详情
关闭
bottle-rauth-0.1.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 276c17c7eb7b1971128959094de631262c645082fdb9f5e0dda28e829040103b |
|
MD5 | 9e126c8180bcea0070f49a3efd25a806 |
|
BLAKE2b-256 | ca23d973022d7182d9da001fef8679a318e8001cd82b893d566b7919f566b985 |
关闭
bottle_rauth-0.1.1-py2.py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b7356b6e924bd7ea4c69d31dc714077c2a45b61572a427ebb7a51693586e8aef |
|
MD5 | 84dbe69eb67a4365c4c5167a8ae32f5e |
|
BLAKE2b-256 | 638a5cc86835d9f4bc3efddefafad8f83a72abac063975b8d037386a7142fdf7 |