-
Notifications
You must be signed in to change notification settings - Fork 151
Re-authentication #1050
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
Re-authentication #1050
Conversation
05355c2
to
cfa7881
Compare
b0bb484
to
8a3dc0c
Compare
59bdd24
to
c5d737f
Compare
d9336cc
to
ced8b9c
Compare
…sition context to create and validate
….TestRenewableAuth5x1 tests
d70e5f4
to
78c2970
Compare
Also rename the structure with token and expiration.
VerifyAuthentication
Hi, apologies if this is the wrong place to ask. Thank you, been looking forward to this work. It looks like this missed the 5.7 release. Is it feasible to put out 5.8 release so we can test out this API preview? |
Hi, yes this is merged into dev and (unless something changes) will be in 5.8 |
I know this feature is in preview, so happy to wait. I wanted to try this out since we've had problems in the past with I believe the typescript types may not all be updated. It seems the second argument to
|
Fix released in 5.9.0 |
This changes introduce two ways of changing the connection credentials in a driver instance, each of them solving a different use case.
Token Expiration / Change Credentials for the whole driver instance
This use case is related to the issue #993 in the repository. For solving this, the driver is now able to receive a
AuthTokenManager
in the driver creation. This interface enables the user code provide new auth tokens to the driver and be notified by token expiration failures.For simplifying the usage, the driver also provides a default implementation of
AuthTokenManager
which can be created withneo4j. expirationBasedAuthTokenManager
and receives a function for renewing the auth token as parameters.Example:
User Switching
In this scenario, different credentials can be configured in a session providing a way for change the user context for the session. For using this feature, it needed to check if your server supports session auth by calling
driver.supportsSessionAuth()
.Example: