将OpenID委托给Google(不是Google Apps) [英] Delegate OpenID to Google (NOT Google Apps)

查看:102
本文介绍了将OpenID委托给Google(不是Google Apps)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用我的个人网站/博客登录使用 openid 并委派给我的Google帐户的网站?

Is it possible to use my personal website/blog to login to sites that use openid, and delegating to my Google account?

好的,我在SO上搜索了这个问题,但没有很好的答案.花了一段时间后,我才知道该怎么做.我将自己回答这个问题,以作为分享它的一种方式.

OK, I searched this question on SO but no good answer. After spent some time I figured out how to do it. I'm going to answer this myself as a way to share it.

推荐答案

现在可以将OpenID委托给您的Google帐户(而非Google Apps).

否,使用App的 demo OpenID提供程序,这不是 引擎.这是您的真实Google帐户!

No, this is not using the demo OpenID provider using App Engine. This is your REAL Google account!

首先,您需要启用您的 Google个人资料.尝试查看您的个人资料并进行编辑,应该有一个选项可以设置您的个人资料网址.您有两种选择:要么使用您的Gmail帐户名(不使用@ gmail.com部分)作为您的个人资料ID,要么使用分配给您的随机数.由您决定使用哪个.无论哪种方式,该ID都是您在下面的个人资料ID.

First you need to enable your Google Profiles. Try to view your profile and edit it, there should be an option to set your Profile URL. You have two choices there: either use your Gmail account name (without the @gmail.com part) as your profile id, or a random number assigned to you. It's up to you to decide which one to use. Either way, that id is your profile id below.

现在将以下HTML代码添加到委派页面:

Now add the following HTML code to your delegating page:

<link rel="openid2.provider" href="https://www.google.com/accounts/o8/ud?source=profiles" /> 
<link rel="openid2.local_id" href="https://profiles.google.com/[YOUR PROFILE ID]" /> 

就完成了.现在尝试使用您的自定义网址登录!

And it's done. Now try login SO with your custom url!

这篇关于将OpenID委托给Google(不是Google Apps)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆