Class UserSelection
java.lang.Object
org.springframework.data.neo4j.core.UserSelection
This is a value object for a Neo4j user, potentially different from the user owning the physical Neo4j connection. To make use of
this a minimum version of Neo4j 4.4 and Neo4j-Java-Driver 4.4 is required, otherwise any usage of
impersonate(String)
together with either the UserSelectionProvider
or the ReactiveUserSelectionProvider
will lead to runtime
errors.
Similar usage pattern like with the dynamic database selection are possible, for example tying
a UserSelectionProvider
into Spring Security and use the current user as a user to impersonate.
- Since:
- 6.2
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionstatic UserSelection
boolean
getValue()
int
hashCode()
static UserSelection
impersonate
(String value)
-
Method Details
-
connectedUser
- Returns:
- A user selection that will just use the user owning the physical connection.
-
impersonate
- Parameters:
value
- The name of the user to impersonate- Returns:
- A user selection representing an impersonated user.
-
getValue
-
equals
-
hashCode
public int hashCode()
-