django-appengine-auth 是 django-social-auth 的扩展,带有用于 Google App Engine OAuth 端点的后端
项目描述
用于 Django 的远程 Google App Engine OAuth 后端
=========================================== =======
[Django-AppEngine-Auth](https://github.com/mback2k/django-appengine-auth) 是
[Django-Social-Auth](https://github.com) 的扩展/omab/django-social-auth)
,它为基于 Google App Engine 的 Google 帐户添加了 OAuth 后端。
此应用程序使用默认托管在 https://oauth-profile.appspot.com/的
[Google App Engine OAuth 配置文件端点应用程序](https://github.com/mback2k/appengine-oauth-profile)依赖------------ - django-social-auth [https://github.com/omab/django-social-auth] - oauth2 [https://github.com/simplegeo/python -oauth2]
安装
------------
从 pypi.python.org 安装最新版本:
pip install django-appengine-auth
通过从 github.com 克隆源安装开发版本:
pip install git+https: //github.com/mback2k/django-appengine-auth.git
配置
-------------
添加包到你的`INSTALLED_APPS`:
INSTALLED_APPS += (
'social_auth',
'appengine_auth',
)
将所需的后端添加到您的“AUTHENTICATION BACKENDS”:
AUTHENTICATION_BACKENDS += (
'appengine_auth.backends.GoogleAppEngineOAuthBackend',
'appengine_auth.backends.GoogleAppEngineOAuth2Backend',
)
将管道添加到您的 `SOCIAL_AUTH_PIPELINE`:
SOCIAL_AUTH_PIPELINE = (
'social_auth.backends.pipeline.social.social_auth_user',
'appengine_auth.pipelines.associate_by_user_id',
# 默认情况下已删除,因为它可能是一种危险的行为,
# 可能导致帐户被占用结束。
#'social_auth.backends.pipeline.associate.associate_by_email'、
'social_auth.backends.pipeline.user.get_username'、
'social_auth.backends.pipeline.user.create_user'、
'social_auth.backends.pipeline.social.associate_user' ,
'social_auth.backends.pipeline.social.load_extra_data',
'social_auth.backends.pipeline.user。update_user_details',
)
附加设置
--------------------
将以下部分或全部设置添加到您的 `settings.py` 中:
# OAuth 和 Web 服务端点的主机名
GOOGLE_APPENGINE_OAUTH_SERVER = 'oauth -profile.appspot.com'
# 使用静态和唯一的 Google App Engine 用户的 user_id 作为标识符
# 默认为 False,这使得它使用用户的电子邮件地址
GOOGLE_APPENGINE_OAUTH_USE_UNIQUE_USER_ID = True
# 设置 Google OAuth 1.0 消费者密钥和秘密
GOOGLE_APPENGINE_CONSUMER_KEY = ''
GOOGLE_APPENGINE_CONSUMER_SECRET = ' '
# 或设置 Google OAuth 2.0 客户端 ID 和密码
GOOGLE_APPENGINE_CLIENT_ID = ''
GOOGLE_APPENGINE_CLIENT_SECRET = ''
请参阅 [Django-Social-Auth](http://django-social-auth.readthedocs.org/)
文档了解更多信息。
许可证
-------
* 根据 MIT 许可证发布
* 版权所有 (c) 2012-2015 Marc Hoersken <info@marc-hoersken.de>
=========================================== =======
[Django-AppEngine-Auth](https://github.com/mback2k/django-appengine-auth) 是
[Django-Social-Auth](https://github.com) 的扩展/omab/django-social-auth)
,它为基于 Google App Engine 的 Google 帐户添加了 OAuth 后端。
此应用程序使用默认托管在 https://oauth-profile.appspot.com/的
[Google App Engine OAuth 配置文件端点应用程序](https://github.com/mback2k/appengine-oauth-profile)依赖------------ - django-social-auth [https://github.com/omab/django-social-auth] - oauth2 [https://github.com/simplegeo/python -oauth2]
安装
------------
从 pypi.python.org 安装最新版本:
pip install django-appengine-auth
通过从 github.com 克隆源安装开发版本:
pip install git+https: //github.com/mback2k/django-appengine-auth.git
配置
-------------
添加包到你的`INSTALLED_APPS`:
INSTALLED_APPS += (
'social_auth',
'appengine_auth',
)
将所需的后端添加到您的“AUTHENTICATION BACKENDS”:
AUTHENTICATION_BACKENDS += (
'appengine_auth.backends.GoogleAppEngineOAuthBackend',
'appengine_auth.backends.GoogleAppEngineOAuth2Backend',
)
将管道添加到您的 `SOCIAL_AUTH_PIPELINE`:
SOCIAL_AUTH_PIPELINE = (
'social_auth.backends.pipeline.social.social_auth_user',
'appengine_auth.pipelines.associate_by_user_id',
# 默认情况下已删除,因为它可能是一种危险的行为,
# 可能导致帐户被占用结束。
#'social_auth.backends.pipeline.associate.associate_by_email'、
'social_auth.backends.pipeline.user.get_username'、
'social_auth.backends.pipeline.user.create_user'、
'social_auth.backends.pipeline.social.associate_user' ,
'social_auth.backends.pipeline.social.load_extra_data',
'social_auth.backends.pipeline.user。update_user_details',
)
附加设置
--------------------
将以下部分或全部设置添加到您的 `settings.py` 中:
# OAuth 和 Web 服务端点的主机名
GOOGLE_APPENGINE_OAUTH_SERVER = 'oauth -profile.appspot.com'
# 使用静态和唯一的 Google App Engine 用户的 user_id 作为标识符
# 默认为 False,这使得它使用用户的电子邮件地址
GOOGLE_APPENGINE_OAUTH_USE_UNIQUE_USER_ID = True
# 设置 Google OAuth 1.0 消费者密钥和秘密
GOOGLE_APPENGINE_CONSUMER_KEY = ''
GOOGLE_APPENGINE_CONSUMER_SECRET = ' '
# 或设置 Google OAuth 2.0 客户端 ID 和密码
GOOGLE_APPENGINE_CLIENT_ID = ''
GOOGLE_APPENGINE_CLIENT_SECRET = ''
请参阅 [Django-Social-Auth](http://django-social-auth.readthedocs.org/)
文档了解更多信息。
许可证
-------
* 根据 MIT 许可证发布
* 版权所有 (c) 2012-2015 Marc Hoersken <info@marc-hoersken.de>