Hello,
Consider a user that has several credentials. For example, the user can use a username or any of their email addresses with their password to login. I have implemented IAuthorizationServer.IsResourceOwnerCredentialValid as well as a custom WCF ServiceAuthorizationManager. When testing with the different credentials, say "
b...@example.com" and then "bob", the
OAuthPrincipal.Identity.Name returns respectively "
b...@example.com" or "bob". From the system's perspective it looks like two different principals. Additional processing is required to determine the actual user.
I'd like to propose that IAuthorizationServer.IsResourceOwnerCredentialValid allows an implementor to return an identifier. For simple scenarios, the implementor can return the username, however, in more complex scenarios, the implementor can return a unique identifier that represents the user. That would allow the WCF service implementations to perform a simple query to determine whether users have access to the resource or not.
If there are no objections, I'd like to file an issue in github. However, this is open for discussion.
Werner