jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.7k stars 95 forks source link

Return unauthorized status instead of bad request when access_token e… #133

Closed AlexeyMatskevich closed 3 years ago

AlexeyMatskevich commented 3 years ago

…xpired to jwt_refresh feature, for inform the client about the need to refresh tokens

jeremyevans commented 3 years ago

Thanks for the patch!

Technically, this is a breakage of backwards compatibility, since users currently expecting a 400 status for expired tokens may break. So we probably can't change the default behavior until a major version bump. I would rename jwt_access_expired_status to expired_jwt_access_token_status and change the default value to 400.

In terms of implementation:

jeremyevans commented 3 years ago

I'm still open to accepting this feature if you plan on implementing the requested changes. However, if you don't plan on working on it this week, I'd like to close this until you are ready.

AlexeyMatskevich commented 3 years ago

Hello! Thanks for the comments, sorry for not responding for so long. I made changes, please review.