Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce auth config to Driver.executeQuery #1177

Merged
merged 5 commits into from
Feb 5, 2024

Conversation

bigmontz
Copy link
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
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.

🍹

packages/core/src/driver.ts Outdated Show resolved Hide resolved
@bigmontz bigmontz merged commit 2d8fd97 into neo4j:5.0 Feb 5, 2024
37 checks passed
@bigmontz bigmontz deleted the 5.18-expose-reauth-executeQuery branch February 5, 2024 09:28
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