标签: openid2

为什么在OpenID 2中使用HTML表单重定向?

为什么要进行自动HTML帖子而不是简单的重定向?

这是否所以开发人员可以自动生成一个登录表单,当OpenID已知时,该表单将目录发布到远程服务器?

例如.

  1. 用户未登录并访问您的登录页面.
  2. 您从cookie中检测到用户的openID.
  3. 生成的表单直接发布到远程OpenID服务器.
  4. 远程服务器将用户重定向回网站.
  5. 网站登录用户.

如果是这种情况,我可以看到好处.但是,这假设您在注销时将用户的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)

openid redirect openid2

10
推荐指数
2
解决办法
2058
查看次数

2017年1月1日Google OpenId Connect to OpenID 2.0映射究竟会发生什么?

根据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,但我们试图更好地确定更改的确切形式.

openid openid2 google-oauth openid-connect google-oauth2

5
推荐指数
1
解决办法
134
查看次数