1
有人可以帮助我得到这个工作。LightOpenId不重定向到登录页面
问题是它只是将一个查询字符串附加到URL,就是这样。没有谷歌登录页面!
http://domain.nl/controller/function?action=verify&openid_identifier=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid
Mayby它是一些特定的事实,我使用mvc设计和htaccess文件。
现在我不清楚解决方案。
请点我在正确的方向
谢谢,理查德
在控制器....这是形式分
public function openid(){
try {
$openid = new LightOpenID;
if(!$openid->mode) {
if(isset($_GET['action'])) {
$openid->identity = 'https://www.google.com/accounts/o8/id';
//$openid->identity = 'https://www.google.com/accounts/o8/site-xrds?hd=YourDomain.in'; //this can be changed as you know...
header('Location: ' . $openid->authUrl());
}
/*<form action="?login" method="post">
<button>Login with Google</button>
</form>*/
} elseif($openid->mode == 'cancel') {
echo 'Gebruiker heeft authenticatie geannuleerd!';
} else {
echo 'Gebruiker ' . ($openid->validate() ? $openid->identity . ' heeft ' : 'heeft niet ') . 'ingelogd.';
}
} catch(ErrorException $e) {
echo $e->getMessage();
}
}