I am making an ajax request in Javascript to get the JWT from my WebAPI AuthenticationProvider. This is my js function:
function authenticateUser(credentials) { var body = { grant_type: 'password', client_id: 'myClientId', client_secret: 'myClientSecret', username: credentials.name, password: credentials.password }; $.ajax({ url: 'http://localhost:9000/token', type: 'POST', dataType: 'json', contentType: 'application/x-www-form-urlencoded; charset=UTF-8', data: body, complete: function(result) {
Although the content was sent correctly in my eyes, the OAuthValidateClientAuthenticationContext has only null values.
My form Data copied from the console:
{"grant_type": "password", "client_id": "myClientId", "client_secret": "myClientSecret", "name": "demo", "password": "123"}
source share