By: Thomas W. user 07 May 2019 at 2:24 a.m. CDT

3 Responses
Thomas W. gravatar
Hello. If I request the `userinfo` endpoint with an expired token, I get a `400 Bad Request` response from Gluu Server. The [documentation](https://gluu.org/docs/ce/3.1.4/api-guide/openid-connect-api/#requestuserinfoget) seems to indicate that I should rather get a `401 Unauthorized` response. # Example The following request is sent to the Gluu Server ``` GET http://example.com/oxauth/restv1/userinfo Content-Type: application/json Authorization: Bearer <EXPIRED_access_token> ``` I get a `400 Bad Request` response with the body ``` { "error": "invalid_token", "error_description": "The access token provided is expired, revoked, malformed, or invalid for other reasons. Try to request a new access token and retry the protected resource." } ``` As mentioned, I'd expect a `401 Unauthorized` response with the same body as above in the case of the endpoint being requested with an expired access token, which also seems like it would be more in line with the specification for [OpenID Connect](https://openid.net/specs/openid-connect-core-1_0.html#UserInfoError) and [OAuth2](https://tools.ietf.org/html/rfc6750#section-3.1). If any more information is needed, please let me know.

By Michael Schwartz Account Admin 07 May 2019 at 3:16 a.m. CDT

Michael Schwartz gravatar
We will take a look at this. Thanks for pointing it out.

By Javier Rojas staff 13 May 2019 at 2:56 p.m. CDT

Javier Rojas gravatar
Hello Thomas, Thank you for the issue report. I have added it to be solved. https://github.com/GluuFederation/oxAuth/issues/1071 Regards Javier

By Thomas W. user 20 May 2019 at 8:14 a.m. CDT

Thomas W. gravatar
Hi Javier. Thanks for the response. I see you have already pushed some changes for this last week. Do you know if it's possible to apply the change as a hotfix to a 3.1.4 installation (like I have previously been instructed [here](https://support.gluu.org/identity-management/6404/scim-patch-operation-unable-to-remove-attributes/#at42566]))? Or will it only be available in 4.0?