To use token-based authentication, the application that connects to the server must provide the authentication token. Authentication tokens can be configured by using configuration parameters in solid.ini:
▪ Client.AuthTokenString: The authentication token.
▪ Client.AuthTokenFile: The path to the file that contains the token.
With JDBC, the authentication token can be provided to the server by using the non-standard JDBC properties solid_authtoken_file and solid_authtoken_string, see JDBC: Non-standard connection properties.
One of these properties must be set before connecting to the server.
Properties prop = new Properties(); prop.setProperty("solid_authtoken_file", filename);
or
Properties prop = new Properties(); prop.setProperty("solid_authtoken_string", authtoken);
The authentication token or file containing the token can be also provided to JDBC by using a URL.
The following URL is an example that contains an authentication token string:
With ODBC, the authentication can be provided to the server by using the non-standard ODBC attributes SQL_ATTR_AUTHTOKEN_FILE or SQL_ATTR_AUTHTOKEN_STRING., see solidDB extensions for ODBC API.
Either of these connection attributes must be set before connecting to the server.