How to make Keycloak accept POST requests to an authorization endpoint

I am trying to integrate keycloak with an authentication service that generates JWT token and sends it via a POST request. For this, I created a custom authenticator that verifies the token and decodes the username. But I can only get the authorization code via a GET request to openid-connect/auth, POST always results in error=invalid_request.

2 Likes

Update: looks like authorization endpoint does accept POST but only if parameters are form encoded… unfortunately authentication service does not allow to inject form parameters so I need a shim.

Is there a clean way to implement a service on a keycloak that acts as an authorization endpoint with set client_id and redirect uri?