bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

refresh_token expiration translate response #943

Open nfinelli opened 6 years ago

nfinelli commented 6 years ago

Hi,

How I could translate the response when a refresh_token is expired:

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "invalid_grant", "status": 400, "detail": "Refresh token has expired" }

We tried using a listener "ResponseListener" to catch the response and override this message. But this doesnt works, the message was the same. (this do not occur with other status like 401, where we have translated messages too)

I'll appreciate your help.

Best regards.