Membrane API Gateway returns a bare 500 Internal Server Error when the token revocation endpoint of the oauth2authserver plugin throws an exception while it handles a request. In most cases the client sent parameters the endpoint cannot parse.
The response contains the status 500 Internal Server Error, the title Internal Server Error and the problem type https://membrane-api.io/problems/internal. The type internal means that the gateway could not complete the processing of the exchange. Membrane hides the details of this error in every mode: the response does not contain a link to this page, the exception message or a stack trace. You find this page through the log or a search.
The oauth2authserver plugin offers a revocation endpoint at <path>/oauth2/revoke. A client sends it a token together with its client_id and client_secret, and the authorization server invalidates the token and its session. The parameters are read from the query string or an application/x-www-form-urlencoded body. For the flows in general, see the authorization code flow tutorial.
The endpoint parses parameters strictly and rejects duplicates, for example token=a&token=b, with Could not parse query.
A value with an invalid percent-escape, for example token=%zz, cannot be URL-decoded.
The request URI cannot be parsed, or the body cannot be read because the client aborted the upload or its Content-Encoding cannot be decoded.
If none of the parsing errors above applies, the session handling of the authorization server ran into an unexpected state. This is rare and usually indicates a bug in Membrane.
token, client_id, client_secret) once, and percent-encode the values correctly.error level together with the request.For this error, Membrane always behaves as in production mode, even when the gateway runs in development mode. The response contains only the status, the title Internal Server Error, the type https://membrane-api.io/problems/internal and, if an exception was recorded, a log key. It never contains a link to this page or the exception message. Search the gateway log for the log key, or for the stack trace logged at error level at the time of the request, to find the cause.
Configuration reference:
Tutorials with runnable examples:
Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.