Skip to content

Release Re-Auth and AuthTokenManager #1150

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

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions packages/core/src/auth-token-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export type SecurityErrorCode = `Neo.ClientError.Security.${string}`
/**
* Interface for the piece of software responsible for keeping track of current active {@link AuthToken} across the driver.
* @interface
* @experimental Exposed as preview feature.
* @since 5.8
* @since 5.14
*/
export default class AuthTokenManager {
/**
Expand Down Expand Up @@ -57,8 +56,7 @@ export default class AuthTokenManager {
/**
* Interface which defines an {@link AuthToken} with an expiration data time associated
* @interface
* @experimental Exposed as preview feature.
* @since 5.8
* @since 5.14
*/
export class AuthTokenAndExpiration {
public readonly token: AuthToken
Expand Down Expand Up @@ -102,7 +100,6 @@ class AuthTokenManagers {
* @param {function(): Promise<AuthTokenAndExpiration>} param0.tokenProvider - Retrieves a new valid auth token.
* Must only ever return auth information belonging to the same identity.
* @returns {AuthTokenManager} The temporal auth data manager.
* @experimental Exposed as preview feature.
*/
bearer ({ tokenProvider }: { tokenProvider: () => Promise<AuthTokenAndExpiration> }): AuthTokenManager {
if (typeof tokenProvider !== 'function') {
Expand All @@ -124,7 +121,6 @@ class AuthTokenManagers {
* @param {function(): Promise<AuthToken>} param0.tokenProvider - Retrieves a new valid auth token.
* Must only ever return auth information belonging to the same identity.
* @returns {AuthTokenManager} The basic auth data manager.
* @experimental Exposed as preview feature.
*/
basic ({ tokenProvider }: { tokenProvider: () => Promise<AuthToken> }): AuthTokenManager {
if (typeof tokenProvider !== 'function') {
Expand All @@ -138,9 +134,7 @@ class AuthTokenManagers {
}

/**
* Holds the common {@link AuthTokenManagers} used in the Driver
*
* @experimental Exposed as preview feature.
* Holds the common {@link AuthTokenManagers} used in the Driver.
*/
const authTokenManagers: AuthTokenManagers = new AuthTokenManagers()

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class SessionConfig {
* which supports Bolt 5.1 and onwards.
*
* @type {AuthToken|undefined}
* @experimental Exposed as preview feature.
* @see {@link driver}
*/
this.auth = undefined
Expand Down
12 changes: 3 additions & 9 deletions packages/neo4j-driver-deno/lib/core/auth-token-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export type SecurityErrorCode = `Neo.ClientError.Security.${string}`
/**
* Interface for the piece of software responsible for keeping track of current active {@link AuthToken} across the driver.
* @interface
* @experimental Exposed as preview feature.
* @since 5.8
* @since 5.14
*/
export default class AuthTokenManager {
/**
Expand Down Expand Up @@ -57,8 +56,7 @@ export default class AuthTokenManager {
/**
* Interface which defines an {@link AuthToken} with an expiration data time associated
* @interface
* @experimental Exposed as preview feature.
* @since 5.8
* @since 5.14
*/
export class AuthTokenAndExpiration {
public readonly token: AuthToken
Expand Down Expand Up @@ -102,7 +100,6 @@ class AuthTokenManagers {
* @param {function(): Promise<AuthTokenAndExpiration>} param0.tokenProvider - Retrieves a new valid auth token.
* Must only ever return auth information belonging to the same identity.
* @returns {AuthTokenManager} The temporal auth data manager.
* @experimental Exposed as preview feature.
*/
bearer ({ tokenProvider }: { tokenProvider: () => Promise<AuthTokenAndExpiration> }): AuthTokenManager {
if (typeof tokenProvider !== 'function') {
Expand All @@ -124,7 +121,6 @@ class AuthTokenManagers {
* @param {function(): Promise<AuthToken>} param0.tokenProvider - Retrieves a new valid auth token.
* Must only ever return auth information belonging to the same identity.
* @returns {AuthTokenManager} The basic auth data manager.
* @experimental Exposed as preview feature.
*/
basic ({ tokenProvider }: { tokenProvider: () => Promise<AuthToken> }): AuthTokenManager {
if (typeof tokenProvider !== 'function') {
Expand All @@ -138,9 +134,7 @@ class AuthTokenManagers {
}

/**
* Holds the common {@link AuthTokenManagers} used in the Driver
*
* @experimental Exposed as preview feature.
* Holds the common {@link AuthTokenManagers} used in the Driver.
*/
const authTokenManagers: AuthTokenManagers = new AuthTokenManagers()

Expand Down
1 change: 0 additions & 1 deletion packages/neo4j-driver-deno/lib/core/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ class SessionConfig {
* which supports Bolt 5.1 and onwards.
*
* @type {AuthToken|undefined}
* @experimental Exposed as preview feature.
* @see {@link driver}
*/
this.auth = undefined
Expand Down
2 changes: 1 addition & 1 deletion packages/neo4j-driver/src/result-rx.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class RxResult {
/**
* Pauses the automatic streaming of records.
*
* This method provides a way of controll the flow of records
* This method provides a way of control the flow of records
*
* @experimental
*/
Expand Down