public class SecurityCentral
extends org.neo4j.kernel.lifecycle.LifecycleAdapter
| Modifier and Type | Field and Description |
|---|---|
static User |
UNAUTHENTICATED |
| Constructor and Description |
|---|
SecurityCentral(org.neo4j.helpers.Clock clock,
UserRepository users) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticate(String user,
String password)
Determine if a set of credentials are valid.
|
User |
newUser(String name,
String initialPassword,
boolean requirePasswordChange,
Privileges privileges) |
User |
regenerateToken(String name)
Set a new random token for a given user
|
User |
setPassword(String name,
String password) |
User |
setToken(String name,
String token) |
void |
start() |
User |
userForName(String name)
Get a user, given a name.
|
User |
userForToken(String token)
Get a user, given a token.
|
public static final User UNAUTHENTICATED
public SecurityCentral(org.neo4j.helpers.Clock clock,
UserRepository users)
public void start()
throws Throwable
start in interface org.neo4j.kernel.lifecycle.Lifecyclestart in class org.neo4j.kernel.lifecycle.LifecycleAdapterThrowablepublic boolean authenticate(String user, String password) throws TooManyAuthenticationAttemptsException
public User newUser(String name, String initialPassword, boolean requirePasswordChange, Privileges privileges) throws IOException, IllegalUsernameException
IOExceptionIllegalUsernameExceptionpublic User userForToken(String token)
unauthenticated user.public User userForName(String name)
unauthenticated user.public User regenerateToken(String name) throws IOException
IOExceptionpublic User setToken(String name, String token) throws IllegalTokenException, IOException
IllegalTokenExceptionIOExceptionpublic User setPassword(String name, String password) throws IOException
IOExceptionCopyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.