为什么要进行自动HTML帖子而不是简单的重定向?
这是否所以开发人员可以自动生成一个登录表单,当OpenID已知时,该表单将目录发布到远程服务器?
例如.
如果是这种情况,我可以看到好处.但是,这假设您在注销时将用户的openID保留在cookie中.
我可以找到关于如何最好地实现此规范的信息.
请参阅官方规范中的HTML FORM Redirection:
http://openid.net/specs/openid-authentication-2_0.html#indirect_comm
我从查看PHP OpenID库(版本2.1.1)中发现了这一点.
// Redirect the user to the OpenID server for authentication.
// Store the token for this authentication so we can verify the
// response.
// For OpenID 1, send a redirect. For OpenID 2, use a Javascript
// form to send a POST request to the server.
if ($auth_request->shouldSendRedirect()) {
$redirect_url = $auth_request->redirectURL(getTrustRoot(),
getReturnTo());
// If the redirect URL can't be built, …Run Code Online (Sandbox Code Playgroud) 根据Google OpenID 2.0迁移时间表,"OpenID 2.0标识符到OAuth 2.0标识符的映射将继续有效,直到2017年1月1日."
从文档中可以100%清楚这种转变将采取什么形式.请求范围:"openid"或openid.realm:"something"开始返回错误?或者旧的openid值是否会在响应中出现?在谷歌ID连接文档仍使用其例如ID连接的认证请求URI值.
有没有人更好地了解这将如何消失?我们的方法是放弃openid范围和openid.realm,但我们试图更好地确定更改的确切形式.