Skip to content

Commit 2e04a17

Browse files
committed
[WIP] authentication
1 parent 34e93c1 commit 2e04a17

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docs/src/authentication.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Authentication
2+
3+
The driver supports only authentication through plain text:
4+
5+
In case you are using plain-text authentication on the server, you can set the `credentials` when creating the
6+
`Client` instance, or provide the instance of `PlainTextAuthProvider` through `authProvider` client option.
7+
8+
```javascript
9+
const scylla = require("scylladb-driver-alpha");
10+
const client = new scylla.Client({
11+
contactPoints,
12+
credentials: { username: 'my_username', password: 'very_secure_password!'}
13+
});
14+
```
15+
16+
```javascript
17+
const scylla = require("scylladb-driver-alpha");
18+
const client = new scylla.Client({
19+
contactPoints,
20+
authProvider: new scylla.auth.PlainTextAuthProvider('my_username', 'very_secure_password!')
21+
});
22+
```

0 commit comments

Comments
 (0)