title: I'm getting NULL parameter when I request for auth2 token in Asp.net WebAPI?
body: <p>I have a web API the authentication method is auth2. It is working fine when I run it in POSTMAN successfully data get and post, Token get successfully and post successfully. I face the problem when I send request from angular7 method the request successfully sent but parameter(UserName, Password) got NULL. Please let me know where is the problem.
  The WebApi and Angular code are below.</p>
  
  <p>Angular Code: </p>
  
  <pre><code> ApiTokenUrl='http://localhost:49978/token';
   UserAuthentication(UserName: string,Password: string):Observable&lt;any&gt;{
   let data="username=" + UserName + "&amp;password=" + Password +  "&amp;grant_type=password";  
   var reqHeader = new HttpHeaders({'Access-Control-Allow-Credentials': 'true','Access-Control-Allow-Origin':'*', 'Content-Type': 'application/x-www-urlencoded','No-Auth':'True' });
    return this.httpClient.post&lt;any&gt;(this.ApiTokenUrl,data,   {headers:reqHeader});
     }
  </code></pre>
  
  <p>When I use the debugger in OAuthAuthorizationServerProvider class and check the parameters(UserName, Password) got NULL
  the request canceled from the below method because it found parameter NULL so request no forward.</p>
  
  <p>WebApi Code:</p>
  
  <pre><code> [EnableCors(origins: "*", headers: "*", methods: "*")]
      public override async Task     ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context)
      {
  
          context.Validated(); 
      }
  </code></pre>
  
  <p>ScreenShots are below 
  <a href="https://i.stack.imgur.com/VbJco.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VbJco.png" alt="enter image description here"></a></p>