Hi,
I am just getting started with mezzio-authentication-oauth2 library and I am having a little trouble with progressing it.
I have started with at mezzio skeleton, added the mezzio-authentication-oauth2 library and created the route /oauth2/token.
When I make a POST, it fails with a http return code 400 regardless of how I set the grant_type.
Request:
{
"grant_type": "authorization_code",
"client_id" : "test_client",
"client_secret" : "test_secret",
"redirect_uri " : "localhost",
"code" : "545604564056"
}
Response:
{
"error": "unsupported_grant_type",
"error_description": "The authorization grant type is not supported by the authorization server.",
"hint": "Check that all required parameters have been provided",
"message": "The authorization grant type is not supported by the authorization server."
}
My grants are all enabled as per the default, so I can’t see why it won’t accept the provided grant type
I must be missing a step in setting up the authorization server, but I can’t see what from the docs.
What do I need to do to allow my grant types to be accepted?