Is google generating new openid claimed identifier for localhost?

泪湿孤枕 提交于 2019-12-19 08:00:38

问题


I am running an issue with google openid identifier. I am using dotnetopenauth library (successor of dotnetopenid) in simple asp.net mvc project. During tests on localhost I noticed that from time to time google generates new claimed identifier. Why is that? Is it just with localhost? Everything looks okay with different providers (like Yahoo)


回答1:


Google OP creates a unique and "anonymous"-looking Claimed Identifier for each user-RP Realm combination. (it is not based on the domain, but the full RP realm, or at least more of it than just the domain). Port number is part of the realm URI, so if your site on localhost changes port numbers occasionally as VS can do without warning, your claimed id will change. Also, if you set up your site to make your claimed_id an "admin" in development, it won't be the correct admin claimed_id in production since the realm will be different.




回答2:


Google's openid is indeed per domain (hey, it bit the SO team, so you're in good company). It really comes down to the implementation details of each openid provider - google have gone a slightly different (but technically valid) route to most. For testing, you might try the blogger provider (still your google account) - it is a bit more static.



来源:https://stackoverflow.com/questions/1031238/is-google-generating-new-openid-claimed-identifier-for-localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!