Skip to content
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

Hooks/Events Interceptors #140

Open
igordeoliveirasa opened this issue Jul 8, 2019 · 1 comment
Open

Hooks/Events Interceptors #140

igordeoliveirasa opened this issue Jul 8, 2019 · 1 comment

Comments

@igordeoliveirasa
Copy link

Is wrapping Traverson a good practice? Its due to the fact that I would like to call refresh token route if current Bearer token is expired. And after refreshed, Id like to set new token to the headers and recall the previous failed resource again. I guess the only way to do that is wrapping Traverson, Am I right?

@basti1302
Copy link
Member

I do not understand the question. You need to be more specific. Maybe some code snippets would help. Or try to explain what exactly you want to do. Not that you can stop a link traversal at any time, inspect the HTTP status, and continue the traversal (after refreshing the token) by using traversal.continue(). See https://github.com/traverson/traverson/blob/master/api.markdown. This is not exactly the hooks/event interceptors API you are looking for, though. This is something that Traverson does not have at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants