ratsume / lightopenid

Automatically exported from code.google.com/p/lightopenid
0 stars 0 forks source link

How can I get the friendly OpenID after validation? #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The code for getting the identity property says "We return claimed_id instead 
of identity, because the developer should see the claimed identifier". That's 
fine for the login security, but it's distracting to the user when he's 
managing his OpenID identities in my account control. See stackoverflow, I have 
a list of my identities and it's not google.com/some-long-blah but it's exactly 
my domain as I've entered it when logging in, even without the unnecessary 
http:// stuff. Can I get that URL back from LightOpenID or do I have to 
remember it elsewhere? Is it safe to remember what the user has entered before 
redirecting away and using that input later again?

Original issue reported on code.google.com by yves.goe...@gmail.com on 2 Mar 2011 at 10:15

GoogleCodeExporter commented 8 years ago
If you want a more friendly name, simply ask for it.

For instructions on how to do it, see 
http://code.google.com/p/lightopenid/wiki/GettingMoreInformation .
Try namePerson/friendly and contact/email.

Original comment by mewp...@gmail.com on 3 Mar 2011 at 10:22

GoogleCodeExporter commented 8 years ago

Original comment by mewp...@gmail.com on 17 Mar 2011 at 2:50

GoogleCodeExporter commented 8 years ago
I wasn't asking for an AX or SREG "friendly name", I just wanted to get the 
original OpenID URI that the user has entered to authenticate. The user doesn't 
want to know his personal name when managing his OpenIDs in my account, he 
needs to see his OpenID URIs. Can I use the one he entered in my login form or 
do I need to ask the OpenId library for it? Which is safe?

Original comment by yves.goe...@gmail.com on 18 Mar 2011 at 9:25

GoogleCodeExporter commented 8 years ago
$openid->identity returns
  a) the (normalized) string an user has entered (that is, claimed_id)
  b) in case of using identifier_select (Google, for example), whatever the server returns -- because the user didn't enter anything

If you used exactly whatever used has provided, you'd have more than one user 
with the same identifier (that is, for example, 
https://www.google.com/accounts/o8/id), because some servers select the 
identity during their authentication process.

According to the standard, you should use the claimed identifier as the user's 
OpenID -- it will be as close as possible to whatever your user has entered as 
his OpenID without being ambiguous.

Original comment by mewp...@gmail.com on 18 Mar 2011 at 9:39