使用Google进行CAS OAuth集成

时间:2013-06-19 05:57:18

标签: oauth-2.0 cas google-oauth

我已经配置了CAS 3.5.2服务器以获得OAuth客户端支持,我已成功使用Facebook进行身份验证我现在想扩展它以获得Google支持,我正在为Facebook做同样的事情即提供客户端ID和秘密,但我收到此错误

 <Failed to get user data, code : 404 / body : <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
  </style>
  <a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/api/people/@me/@self</code> was not found on this server.  <ins>That’s all we know.</ins>

如果有人能指出我正确的方向,我会非常感激。

1 个答案:

答案 0 :(得分:0)

我是OAuth支持CAS的创建者。

Google已取消对OAuth协议版本1.0的支持,因此GoogleProvider不再有效。

您应该升级到:

  • Google2Provider(如果使用CAS服务器3.5.2,请使用scribe-up 1.3.1依赖,而不是划线1.2.0)
  • Google2Client(如果您使用CAS服务器4.0.0,请使用pac4j-oauth 1.4.0依赖项。)
相关问题