-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore soft deleted users on authentication (#5549)
* internal/clientcache: restore user on login A user that previously had its last auth token deleted (for example, if they logged out), should be restored again when they successfully authenticate again. * internal/clientcache: delete keyringless expired auth tokens Previously, we would only correctly delete auth tokens that were expired (or deleted) if they were also in the keyring. * internal/clientcache: remove tautological condition At this stage we already know that at is non-nil, because the case above would have been true if it was nil. * internal/clientcache: improve error handling The previous error handling would have ignored API errors that were not ErrUnauthorized or ErrNotFound. Handle all API errors the same as other unexpected errors. * internal/clientcache: make errors distinct These two error conditions are otherwise impossible to tell apart. * test(e2e): Update search test to catch bug (#5551) --------- Co-authored-by: Michael Li <michael.li@hashicorp.com>
- Loading branch information
1 parent
11c19d5
commit 262693f
Showing
3 changed files
with
137 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters