ADR 019: revamp auth managers #957
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the preview feature "re-auth" (introduced in PR #890) significantly. The changes allow for catering to a wider range of use cases including simple password rotation.
(⚠️ Breaking) changes:
TokenExpiredRetryable
exception.Even though it wasn't marked preview, it was introduced with and only used for re-auth. It now longer serves any purpose.
AuthManager
andAsyncAuthManager
abstract classes were changed.The method
on_auth_expired(self, auth: _TAuth) -> None
was removed in favor ofdef handle_security_exception(self, auth: _TAuth, error: Neo4jError) -> bool
. See the API docs for more details.AsyncAuthManagers
a ndAuthManagers
were changed.expiration_based
was renamed tobearer
.basic
was added to cater for password rotation.Depends on: