Skip to content

Introduce auth config to Driver.executeQuery#1177

Merged
bigmontz merged 5 commits intoneo4j:5.0from
bigmontz:5.18-expose-reauth-executeQuery
Feb 5, 2024
Merged

Introduce auth config to Driver.executeQuery#1177
bigmontz merged 5 commits intoneo4j:5.0from
bigmontz:5.18-expose-reauth-executeQuery

Conversation

@bigmontz
Copy link
Copy Markdown
Contributor

@bigmontz bigmontz commented Feb 1, 2024

The AuthToken will be used for executing the query.

By default, the query executor will use connections authenticated with the AuthToken configured on driver creation. This new configuration allows switching user and/or authorization information for the underlying transaction's lifetime.

Example:

const { records } = await driver.executeQuery('RETURN $abc', { abc: 'dfe' }, {
   database: 'neo4j',
   auth: neo4j.auth.basic('otheruser', 'sup3rDup3rS3cret')
})

Note

This option is only available when the driver is connected to Neo4j Database servers which supports Bolt 5.1 or newer.

The AuthToken will be used for executing the query.

By default, the query executor will use connections authenticated with AuthToken configured in the
driver creation. This configuration allows switch user and/or authorization information for the
execution lifetime.

**Warning**: This option is only enable when the driver is connected with Neo4j Database servers
which supports Bolt 5.1 and onwards.
Copy link
Copy Markdown
Member

@robsdedude robsdedude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍹

Comment thread packages/core/src/driver.ts Outdated
bigmontz and others added 3 commits February 2, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants