2013-06-19 47 views
0

我已配置CAS 3.5.2服務器以支持OAuth客戶端,現在我已成功使用Facebook進行身份驗證,現在我想將其擴展爲支持Google,我也在做同樣的事情對於Facebook即,提供客戶端ID和祕密,但我收到此錯誤使用Google集成CAS OAuth

<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> 

如果任何人都可以點我正確的方向,我會非常感激。

回答

0

我是CAS的OAuth支持的創建者。

Google已經取消了對OAuth協議版本1.0的支持,因此GoogleProvider不再適用。

你應該升級到:

  • Google2Provider(使用刻劃了1.3.1的依賴,而不是刻劃了1.2.0如果使用CAS服務器3.5.2)
  • Google2Client(使用pac4j-如果您使用CAS服務器4.0.0,則oauth 1.4.0依賴項)。