When the user clicks the OpenIdButton to log on to myOpenID, they navigate to the myOpenID sign in page and are prompted for a Username and password.
The returned ClaimedIdentifier starts with https (note the 's')
When the user enters their username in the OpenIdLogin control the r开发者_StackOverflow社区eturned ClaimedIdentifier starts with http (no 's').
Why is this happening? More importantly, how can I rely on a consistent username in my database if the return value can change depending on the login technique?
Is this a bug or am I doing something wrong?
Ken
One (although not recommended) method would be to strip protocol path of the URL.
Also, it's not a bug in the library, it's just the same provider returning different identifiers for different authentication methods -- Google does it too (accounts vs profiles).
When user inputs 'x.myopenid.com', it's translated (according to the spec) to 'http://x.myopenid.com', so the server returns identity with http://.
If the user would input https://x.myopenid.com, the server would return identity with https://.
Another thing is that MyOpenID should redirect from http to https, but doesn't do so.
精彩评论