-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: SetAuthTokenFunc() #615
Comments
Hi @MB175, I think you can setup the middleware for every request:
Source: https://github.com/go-resty/resty#request-and-response-middleware I hope this could be help this discussion. |
@kecci hi, yes thats exactly how I solved it right now. I just thought since there is a set auth token func, it would be just as handy to have a dedicated refresher func. |
Hi @MB175, Yes, as quoted above I think we should check that the token has expired before refreshing the token. |
Yes that's the setup I use, it's not about what refresh cycle or method is used. It's more about a convince Feature since there is a method to set an token I figured it might make sense if you could pass a custom refresher func along side |
Add ability to pass a custom func which is called on every request to renew or check authToken validity
The text was updated successfully, but these errors were encountered: