public interface UserRepository
extends org.neo4j.kernel.lifecycle.Lifecycle
| Modifier and Type | Method and Description |
|---|---|
void |
assertValidUsername(String username)
Asserts whether the given username is valid or not.
|
void |
clear()
Clears all cached user data.
|
void |
create(org.neo4j.kernel.impl.security.User user)
Create a user, given that the users token is unique.
|
boolean |
delete(org.neo4j.kernel.impl.security.User user)
Deletes a user.
|
Set<String> |
getAllUsernames() |
ListSnapshot<org.neo4j.kernel.impl.security.User> |
getPersistedSnapshot()
Returns a snapshot of the current persisted user repository
|
org.neo4j.kernel.impl.security.User |
getUserByName(String username)
Return the user associated with the given username.
|
int |
numberOfUsers() |
void |
setUsers(ListSnapshot<org.neo4j.kernel.impl.security.User> users)
Replaces the users in the repository with the given users.
|
void |
update(org.neo4j.kernel.impl.security.User existingUser,
org.neo4j.kernel.impl.security.User updatedUser)
Update a user, given that the users token is unique.
|
void clear()
org.neo4j.kernel.impl.security.User getUserByName(String username)
username - the usernamevoid create(org.neo4j.kernel.impl.security.User user)
throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException,
IOException
user - the new user objectorg.neo4j.kernel.api.exceptions.InvalidArgumentsException - if the username is not validIOException - if the underlying storage for users failsvoid setUsers(ListSnapshot<org.neo4j.kernel.impl.security.User> users) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException, IOException
users - the new usersorg.neo4j.kernel.api.exceptions.InvalidArgumentsException - if any username is not validIOException - if the underlying storage for users failsvoid update(org.neo4j.kernel.impl.security.User existingUser,
org.neo4j.kernel.impl.security.User updatedUser)
throws ConcurrentModificationException,
IOException,
org.neo4j.kernel.api.exceptions.InvalidArgumentsException
existingUser - the existing user object, which must match the current state in this repositoryupdatedUser - the updated user objectConcurrentModificationException - if the existingUser does not match the current state in the repositoryIOException - if the underlying storage for users failsorg.neo4j.kernel.api.exceptions.InvalidArgumentsException - if the existing and updated users have different namesboolean delete(org.neo4j.kernel.impl.security.User user)
throws IOException
user - the user to deleteIOException - if the underlying storage for users failsint numberOfUsers()
void assertValidUsername(String username) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException
username - the username to be tested.org.neo4j.kernel.api.exceptions.InvalidArgumentsException - if the username was invalid.ListSnapshot<org.neo4j.kernel.impl.security.User> getPersistedSnapshot() throws IOException
IOExceptionCopyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.