title: OWIN + OAuth - How to provide User ID instead of UserName
body: <p>I'm creating my own authorization provider that extends from <code>OAuthAuthorizationServerProvider</code>.</p>
  
  <pre><code>public class AsyncAuthorizationProvider : OAuthAuthorizationProvider {
       //...
       public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) {
           string username = context.UserName; //Returns the username sent in the request.
           string password = context.Password; //Returns the password sent in the request.
           //...
       }
  }
  </code></pre>
  
  <p>As you can see <code>OAuthGrantResourceOwnerCredentialsContext</code>'s context already comes with two useful properties for retrieving the username and password.</p>
  
  <p>This information is sent by the user when requested to my oauth endpoint:</p>
  
  <pre><code>{
      "grant_type": "password",
      "client_id": "someClientId",
      "client_secret": "someClientSecret",
      "username": "myUsername",
      "password": "myPassword"
  }
  </code></pre>
  
  <p>This JSON is stored in the OAuth context, but what if I want to send my <code>userId</code> instead of my <code>username</code>?. What if my application allows for duplicate usernames and I want to use the <code>id</code> to uniquely identify one?</p>
  
  <p>Of course, I can send my Id as <code>"username": "myUserId"</code>. But this doesn't seem right.</p>
  
  <p><code>username</code> should contain an <code>username</code>. This may confuse consumers.</p>
  
  <p>Is there a way to send an <code>userId</code> <strong>and</strong> to retrieve it from the context?</p>