问题描述
我只是想知道我是否需要的是身份网址,以便理论上将OpenID帐户附加到用户的帐户。我有身份网址如下所示:。
OpenID 1.0和2.0之间是不同的吗?
有人问:我正在使用Django +
感谢guys = $
用户帐户是声明的标识符,这是您调用的提供的示例URL。 OpenID 1.x和2.0具有很少的URL,包括openid.identity和openid.claimed_id值。重要的是,您正在从属性中读取 openid.claimed_id
而不是 openid.identity
存储用户帐户的值。在Google的情况下,同样的价值将被放在这两个参数中,所以很难确定您是否从正在使用的OpenID库中获取正确的内容。
只需查看Django向您提供的内容,如果您看到任何看起来像是claim_id的内容,请使用它。
I'm just wondering if all I need is the identity url in order to to theoretically attach an OpenID account to a user's account.
I have identity urls that look like the following: https://www.google.com/accounts/o8/id?id=YGnyuGHMUmhUI98nuhUMhu98nuN.
Is this different between OpenID 1.0 and 2.0?
Just in case someone asks: I'm using Django + django-openid-consumer
Thanks guys =)
All you need to bind to a user account is the "Claimed Identifier" which is what the sample URL you provided is called. OpenID 1.x and 2.0 have a handful of URLs it deals with, including "openid.identity" and "openid.claimed_id" values. It is very important that you're reading from the property that gives you openid.claimed_id
rather than openid.identity
when storing the value with the user account. In the case of Google as you showed, the same value is put into both parameters so it's hard to know for sure whether you're getting the right thing from the OpenID library you're using.
Just review what Django offers to you, and if you see anything that looks like claimed_id, use that.
这篇关于所有我需要“身份URL”? - OpenID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!