Skip to content

Commit dbeccd8

Browse files
authored
Add example for bearer token auth (#814)
1 parent d91df6d commit dbeccd8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/neo4j-driver/test/examples.test.js

+10
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,16 @@ describe('#integration examples', () => {
281281
await driver.close()
282282
}, 60000)
283283

284+
it('bearer auth example', async () => {
285+
const token = 'a base64 encoded token'
286+
287+
// tag::bearer-auth[]
288+
const driver = neo4j.driver(uri, neo4j.auth.bearer(token))
289+
// end::bearer-auth[]
290+
291+
await driver.close()
292+
}, 60000)
293+
284294
it('cypher error example', async () => {
285295
const console = consoleOverride
286296
const consoleLoggedMsg = consoleOverridePromise

0 commit comments

Comments
 (0)