public class AuthTokens extends Object
GraphDatabase.driver(String, AuthToken)| Constructor and Description |
|---|
AuthTokens() |
| Modifier and Type | Method and Description |
|---|---|
static AuthToken |
basic(String username,
String password)
The basic authentication scheme, using a username and a password.
|
static AuthToken |
basic(String username,
String password,
String realm)
The basic authentication scheme, using a username and a password.
|
static AuthToken |
bearer(String token)
The bearer authentication scheme, using a base64 encoded token.
|
static AuthToken |
custom(String principal,
String credentials,
String realm,
String scheme)
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 |
kerberos(String base64EncodedTicket)
The kerberos authentication scheme, using a base64 encoded ticket
|
static AuthToken |
none()
No authentication scheme.
|
public static AuthToken basic(String username, String password)
username - this is the "principal", identifying who this token representspassword - this is the "credential", proving the identity of the userNullPointerException - when either username or password is nullGraphDatabase.driver(String, AuthToken)public static AuthToken basic(String username, String password, String realm)
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 providerNullPointerException - when either username or password is nullGraphDatabase.driver(String, AuthToken)public static AuthToken bearer(String token)
token - base64 encoded tokenNullPointerException - when token is nullGraphDatabase.driver(String, AuthToken)public static AuthToken kerberos(String base64EncodedTicket)
base64EncodedTicket - a base64 encoded service ticketNullPointerException - when ticket is nullGraphDatabase.driver(String, AuthToken)public static AuthToken custom(String principal, String credentials, String realm, String scheme)
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 usedNullPointerException - when either principal, credentials or scheme is nullGraphDatabase.driver(String, AuthToken)public static AuthToken custom(String principal, String credentials, String realm, String scheme, Map<String,Object> 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.NullPointerException - when either principal, credentials or scheme is nullGraphDatabase.driver(String, AuthToken)public static AuthToken none()
GraphDatabase.driver(String, AuthToken)