gabel / opauth-google-proxy
Opauth的Google认证策略
0.2.7
2018-02-15 15:23 UTC
Requires
- php: >=5.2.0
- opauth/opauth: >=0.2.0
This package is auto-updated.
Last update: 2024-09-08 19:06:43 UTC
README
Google认证的Opauth策略。
基于https://developers.google.com/accounts/docs/OAuth2使用OAuth 2.0实现。
Opauth是PHP的多认证提供者框架。
入门指南
-
安装Opauth-Google
cd path_to_opauth/Strategy git clone git://github.com/uzyn/opauth-google.git Google -
在https://code.google.com/apis/console/创建Google API项目
- 您不需要在“服务”选项卡中启用任何服务。
- 确保访问“API访问”选项卡并创建一个OAuth 2.0客户端ID。
- 选择应用程序类型为“Web应用程序”
- 确保将重定向URI设置为实际的OAuth 2.0回调URL,通常是
http://path_to_opauth/google/oauth2callback
-
配置Opauth-Google策略。
-
直接用户到
http://path_to_opauth/google进行认证
策略配置
必需参数
<?php 'Google' => array( 'client_id' => 'YOUR CLIENT ID', 'client_secret' => 'YOUR CLIENT SECRET' )
可选参数:scope,state,access_type,approval_prompt
参考
许可证
Opauth-Google采用MIT许可证
版权© 2012 U-Zyn Chua (http://uzyn.com)