IdentityServer / IdentityServer3.AspNetIdentity

ASP.NET Identity support for Thinktecture IdentityServer3
Apache License 2.0
64 stars 51 forks source link

User claims #54

Closed pawepaw closed 9 years ago

pawepaw commented 9 years ago

Why do you assign User.Name as preferred_username claim? Shouldn't it be stored inside Name claim?

If not whats the purpose of Name and preferred_username claim? From what I understand Name is User name on database (his unique identifier) and preferred_username is how user wants to be called?

Sure it's just name of claim but It's missleading and in other systems name means name so why save it into another claim?

leastprivilege commented 9 years ago

Name is the display name. "sub" is the unique ID.

pawepaw commented 9 years ago

Sure I know that sub is unique ID. But when user is logging in he needs unique identifier and password to log in (email, name or something). I understand that you treat preferred_username like this identitifier?

leastprivilege commented 9 years ago

That's the reason we turned the nuget into a source code package. Different people, different styles. Use the source and treat it the way you want.

pawepaw commented 9 years ago

Sure I see source code and i get what's going on in there. I'm asking because i am a little bit confused. In asp.net identity user.identity.name used to store unique identifier (userName) and you assign there name claim which is treated by you like Display name and i was thinking if it's a good idea to keep something not unique there.