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

Gracefully handle token expiration #200

Open
ianlivingstone opened this issue Jan 25, 2017 · 4 comments
Open

Gracefully handle token expiration #200

ianlivingstone opened this issue Jan 25, 2017 · 4 comments

Comments

@ianlivingstone
Copy link
Contributor

If a token expires, or becomes invalid, the daemon does not destroy the session -- instead it will continue to attempt to use its currently stored session until the daemon is restarted or a user explicitly logs out through the CLI.

We should detect this scenario and destroy the session if a 401 is returned.

@ianlivingstone
Copy link
Contributor Author

Thoughts @jeffandersen @jbowes @jelmersnoeck ?

@jeffandersen
Copy link
Contributor

You're gonna get a 401 back on requests which you're denied through ACL, so forcing you to log in again after that would suck.

This might involve adding a route specific to just testing auth, and ensure that we call that first?

Unless we can start storing the expiry alongside the token and just have the daemon check that locally first.

@ianlivingstone
Copy link
Contributor Author

You're gonna get a 401 back on requests which you're denied through ACL, so forcing you to log in again after that would suck.

Yeah, we'd need to differentiate between an unauthorized access error and invalid session -- ideally through the error message type or some other piece of meta data.

@ianlivingstone
Copy link
Contributor Author

We should probably differentiate between Forbidden access and not having a valid session (Unauthorized) to support this feature appropriately.

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

No branches or pull requests

2 participants