|
44 | 44 | // ConnectionOptions::OPTION_ENDPOINT => 'unix:///tmp/arangodb.sock', // UNIX domain socket
|
45 | 45 |
|
46 | 46 | ConnectionOptions::OPTION_CONNECTION => 'Keep-Alive', // can use either 'Close' (one-time connections) or 'Keep-Alive' (re-used connections)
|
47 |
| - ConnectionOptions::OPTION_AUTH_TYPE => 'Basic', // use basic authorization |
48 | 47 |
|
49 |
| - // authentication parameters (note: must also start server with option `--server.disable-authentication false`) |
50 |
| - ConnectionOptions::OPTION_AUTH_USER => 'root', // user for basic authorization |
51 |
| - ConnectionOptions::OPTION_AUTH_PASSWD => '', // password for basic authorization |
| 48 | + // authentication parameters |
| 49 | + ConnectionOptions::OPTION_AUTH_TYPE => 'Basic', // use HTTP Basic authorization |
| 50 | + ConnectionOptions::OPTION_AUTH_USER => 'root', // user for Basic authorization |
| 51 | + ConnectionOptions::OPTION_AUTH_PASSWD => '', // password for Basic authorization |
| 52 | + |
| 53 | + // in order to not send passwords, it is possible to make the driver generate a JWT for an existing user. |
| 54 | + // this requires knowledge of the server's JWT secret key, however: |
| 55 | + // ConnectionOptions::OPTION_AUTH_TYPE => 'Bearer', // use HTTP Bearer authorization |
| 56 | + // ConnectionOptions::OPTION_AUTH_USER => 'root', // user name |
| 57 | + // ConnectionOptions::OPTION_AUTH_PASSWD => '', // server's JWT secret needs to go in here |
| 58 | + |
| 59 | + // in order to use an externally generated JWT, there is no need to specify user and passwd, but just the JWT value: |
| 60 | + // ConnectionOptions::OPTION_AUTH_JWT => '', // use an externally generated JWT for authorization |
52 | 61 |
|
53 | 62 | ConnectionOptions::OPTION_TIMEOUT => 30, // timeout in seconds
|
54 | 63 | // ConnectionOptions::OPTION_TRACE => $traceFunc, // tracer function, can be used for debugging
|
|
0 commit comments