Interface AuthTokenManager

All Known Implementing Classes:
ExpirationBasedAuthTokenManager, StaticAuthTokenManager, ValidatingAuthTokenManager

@Preview(name="AuthToken rotation and session auth support") public interface AuthTokenManager
A manager of AuthToken instances used by the driver.

The manager must manage tokens for the same identity. Therefore, it is not intended for a change of identity.

Implementations should supply the same token unless it needs to be updated since a change of token might result in extra processing by the driver.

Driver initializes new connections with a token supplied by the manager. If token changes, driver action depends on connection's Bolt protocol version:

  • Bolt 5.1 or above - LOGOFF and LOGON messages are dispatched to update the token on next interaction
  • Bolt 5.0 or below - connection is closed an a new one is initialized with the new token

All implementations of this interface must be thread-safe and non-blocking for caller threads. For instance, IO operations must not be done on the calling thread.

Since:
5.8