Hey I just programmed a token based authentication following this tutorial. So everything goes fine as long I send my POST request as x-www-form-urlencoded. So now my teammate needs to get the token with a json, but all he gets is "unsupported grant_type". So can I change the acceptable type for the token or do I have to find another solution?
My configuration looks like this:
public void Configuration(IAppBuilder app)
{
app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
var myProvider = new MyAuthorizationServerProvider();
OAuthAuthorizationServerOptions options = new OAuthAuthorizationServerOptions
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
Provider = myProvider
};
app.UseOAuthAuthorizationServer(options);
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
HttpConfiguration config = new HttpConfiguration();
WebApiConfig.Register(config);
}
}
This is how my request look like keep in mind this doesnt work with json
And with a JSON it doesnt work:
Best regards :)