Skip to content

Commit

Permalink
Release Re-Auth and AuthTokenManager (#542)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCathcart authored Oct 26, 2023
1 parent 16b4b5f commit 56358bd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
9 changes: 0 additions & 9 deletions neo4j/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ import (
//
// The manager *must not* interact with the driver in any way as this can cause deadlocks and undefined behaviour.
// Furthermore, the manager is expected to be thread-safe.
//
// TokenManager is part of the re-authentication preview feature
// (see README on what it means in terms of support and compatibility guarantees)
type TokenManager interface {
// GetAuthToken retrieves an auth.Token or returns an error if the retrieval fails.
// auth.Token can be created with built-in functions such as:
Expand Down Expand Up @@ -115,9 +112,6 @@ func (m *neo4jAuthTokenManager) HandleSecurityException(ctx context.Context, tok
//
// The provider function must only ever return auth information belonging to the same identity.
// Switching identities is undefined behavior.
//
// BasicTokenManager is part of the re-authentication preview feature
// (see README on what it means in terms of support and compatibility guarantees)
func BasicTokenManager(provider authTokenProvider) TokenManager {
now := time.Now
return &neo4jAuthTokenManager{
Expand All @@ -142,9 +136,6 @@ func BasicTokenManager(provider authTokenProvider) TokenManager {
//
// The provider function must only ever return auth information belonging to the same identity.
// Switching identities is undefined behavior.
//
// BearerTokenManager is part of the re-authentication preview feature
// (see README on what it means in terms of support and compatibility guarantees)
func BearerTokenManager(provider authTokenWithExpirationProvider) TokenManager {
now := time.Now
return &neo4jAuthTokenManager{
Expand Down
8 changes: 0 additions & 8 deletions neo4j/driver_with_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ type DriverWithContext interface {
// Otherwise, the error will be matched against a list of known authentication errors.
// If the error is on that list, an `neo4j.InvalidAuthenticationError` is returned.
// Otherwise, the original error is returned.
//
// VerifyAuthentication is part of the re-authentication preview feature
// (see README on what it means in terms of support and compatibility guarantees)
VerifyAuthentication(ctx context.Context, auth *AuthToken) error
// Close the driver and all underlying connections
Close(ctx context.Context) error
Expand Down Expand Up @@ -144,11 +141,6 @@ type ResultTransformer[T any] interface {
// - `neo4j.KerberosAuth`
// - `neo4j.BearerAuth`
// - `neo4j.CustomAuth`
//
// `TokenManager` is part of the re-authentication preview feature
// (see README on what it means in terms of support and compatibility guarantees).
// The pre-defined auth mechanisms listed above however are guaranteed to be supported
// as `auth` argument to this function.
func NewDriverWithContext(target string, auth auth.TokenManager, configurers ...func(*Config)) (DriverWithContext, error) {
parsed, err := url.Parse(target)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions neo4j/session_with_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,6 @@ type SessionConfig struct {
// - `neo4j.KerberosAuth`
// - `neo4j.BearerAuth`
// - `neo4j.CustomAuth`
//
// Session auth is part of the re-authentication preview feature
// (see README on what it means in terms of support and compatibility guarantees).
Auth *AuthToken

forceReAuth bool
Expand Down

0 comments on commit 56358bd

Please sign in to comment.