Implement custom error codes for token validation


Paul Bakare
 

Hi,

During token validation (check_token endpoint), is it possible to get
custom error codes per error message? Error messages such
as {"error":"invalid_token","error_description":"Invalid token (could not
decode) and "Token has expired" maintain singular error code.

I often perform conditional text globbing just to derive the specific token
error like this:

if (response.statusCode != 200 && (answer.error_description != "Token has
expired"))

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.