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

Intercept okhttp3 responses to determine if Moodle token is still valid or not #288

Open
abhijeetviswa opened this issue Jan 11, 2021 · 1 comment

Comments

@abhijeetviswa
Copy link
Member

Interceptors could be used for this. This would be easier than checking if token is valid or not at every point in the codebase where a request is sent.

@fynngodau
Copy link
Contributor

I think this is a great idea. For the moodleDirect fork, I implemented it like this: https://codeberg.org/fynngodau/moodleDirect/commit/66f9309b834b3c61dddd7c8fb0a8a2bfb0679080

This way I can detect whenever a moodle Exception needs to be thrown.

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