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 AuthTokenThe basic authentication scheme, using a username and a password.static AuthTokenThe basic authentication scheme, using a username and a password.static AuthTokenThe bearer authentication scheme, using a base64 encoded token.static AuthTokenA custom authentication token used for doing custom authentication on the server side.static AuthTokencustom(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 AuthTokenThe kerberos authentication scheme, using a base64 encoded ticketstatic AuthTokennone()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:
-