java.lang.Object
org.neo4j.driver.AuthTokens
This is a listing of the various methods of authentication supported by this
driver. The scheme used must be supported by the Neo4j Instance you are connecting
to.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthToken
The basic authentication scheme, using a username and a password.static AuthToken
The basic authentication scheme, using a username and a password.static AuthToken
The bearer authentication scheme, using a base64 encoded token.static AuthToken
A custom authentication token used for doing custom authentication on the server side.static AuthToken
custom
(String principal, String credentials, String realm, String scheme, Map<String, Object> parameters) A custom authentication token used for doing custom authentication on the server side.static AuthToken
The kerberos authentication scheme, using a base64 encoded ticketstatic AuthToken
none()
No authentication scheme.
-
Method Details
-
basic
The basic authentication scheme, using a username and a password.- Parameters:
username
- this is the "principal", identifying who this token representspassword
- this is the "credential", proving the identity of the user- Returns:
- an authentication token that can be used to connect to Neo4j
- Throws:
NullPointerException
- when either username or password isnull
- See Also:
-
basic
The basic authentication scheme, using a username and a password.- Parameters:
username
- this is the "principal", identifying who this token representspassword
- this is the "credential", proving the identity of the userrealm
- this is the "realm", specifies the authentication provider- Returns:
- an authentication token that can be used to connect to Neo4j
- Throws:
NullPointerException
- when either username or password isnull
- See Also:
-
bearer
The bearer authentication scheme, using a base64 encoded token.- Parameters:
token
- base64 encoded token- Returns:
- an authentication token that can be used to connect to Neo4j
- Throws:
NullPointerException
- when token isnull
- See Also:
-
kerberos
The kerberos authentication scheme, using a base64 encoded ticket- Parameters:
base64EncodedTicket
- a base64 encoded service ticket- Returns:
- an authentication token that can be used to connect to Neo4j
- Throws:
NullPointerException
- when ticket isnull
- Since:
- 1.3
- See Also:
-
custom
A custom authentication token used for doing custom authentication on the server side.- Parameters:
principal
- this used to identify who this token representscredentials
- this is credentials authenticating the principalrealm
- this is the "realm:", specifying the authentication provider.scheme
- this it the authentication scheme, specifying what kind of authentication that should be used- Returns:
- an authentication token that can be used to connect to Neo4j
- Throws:
NullPointerException
- when either principal, credentials or scheme isnull
- See Also:
-
custom
public static AuthToken custom(String principal, String credentials, String realm, String scheme, Map<String, Object> parameters) A custom authentication token used for doing custom authentication on the server side.- Parameters:
principal
- this used to identify who this token representscredentials
- this is credentials authenticating the principalrealm
- this is the "realm:", specifying the authentication provider.scheme
- this it the authentication scheme, specifying what kind of authentication that should be usedparameters
- extra parameters to be sent along the authentication provider.- Returns:
- an authentication token that can be used to connect to Neo4j
- Throws:
NullPointerException
- when either principal, credentials or scheme isnull
- See Also:
-
none
No authentication scheme. This will only work if authentication is disabled on the Neo4j Instance we are connecting to.- Returns:
- an authentication token that can be used to connect to Neo4j instances with auth disabled
- See Also:
-