Table of Contents

Method WithAuthToken

Namespace
Neo4j.Driver
Assembly
Neo4j.Driver.dll

WithAuthToken(IAuthToken)

Use this overwrite the authentication information for the session. This requires the server to support re-authentication on the protocol level. You can check this by calling SupportsSessionAuthAsync().

It is not possible to overwrite the authentication information for the session with no authentication, i.e., downgrade the authentication at session level. Instead, you should create a driver with no authentication and upgrade the authentication at session level as needed.
public SessionConfigBuilder WithAuthToken(IAuthToken authToken)

Parameters

authToken IAuthToken

The auth token.

Returns

SessionConfigBuilder

this SessionConfigBuilder instance

See Also