我使用lightopenid对gmail进行身份验证。
找到here:
显示gmail登录页面的默认方式是全页面版本。但我注意到其他网站显示了“弹出版本”,在URL中是
<mpl=popup
我已经看过了代码,看不到向auth URL字符串添加一些自定义选项的方法。
有没有人能做到这一点?
try
{
$lightopenid = new Lightopenid;
$lightopenid->required = $required_attr;
if(!isset($_GET['openid_mode']))
{
$ui = "&openid.ns.ui=" . urlencode('=http://specs.openid.net/extensions/ui/1.0') . "&openid.ui.mode=popup";
$lightopenid->identity = 'https://www.google.com/accounts/o8/id';
redirect($lightopenid->authUrl() . $ui, 'refresh');
}谢谢
发布于 2011-10-22 01:43:30
由于$openid->authUrl()返回一个url,因此向其添加选项并不太难。
据我所知,这是正确的做法:
$ui = "&openid.ns.ui=" . urlencode('http://specs.openid.net/extensions/ui/1.0') . "&openid.ui.mode=popup"
header('Location: ' . $openid->authUrl() . $ui);https://stackoverflow.com/questions/7847969
复制相似问题