public abstract class BasicUserProvider extends Object implements UserProvider
UserProvider that implements all the methods in a default way.| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultcontextField |
protected String |
lastLogonField |
protected String |
passwordField |
protected String |
statusField |
protected String |
userNameField |
protected String |
validFromField |
protected String |
validToField |
| Constructor and Description |
|---|
BasicUserProvider(MMObjectBuilder ub) |
BasicUserProvider(String b) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
clientEncode(String e) |
String |
encode(String e) |
MMObjectNode |
getAnonymousUser()
Returns the anonymous user node, or
null if there is no such node (yet). |
String |
getDefaultContext(MMObjectNode node) |
protected String |
getDefaultContextField() |
protected CoreField |
getField(String f) |
protected String |
getLastLogonField() |
protected String |
getPasswordField() |
Rank |
getRank(MMObjectNode userNode) |
protected String |
getStatusField() |
MMObjectNode |
getUser(String userName)
Gets the usernode by userName (the 'identifier').
|
MMObjectNode |
getUser(String userName,
String password,
boolean encoded)
Returns the node associated with a certain username/password combination,
or
null |
MMObjectBuilder |
getUserBuilder() |
MMObjectNode |
getUserByRank(String rank,
String userName)
Returns the node associated with a certain username/rank combination
or
null |
protected boolean |
getUserNameCaseSensitive() |
protected String |
getUserNameField() |
protected String |
getValidFromField() |
protected String |
getValidToField() |
protected boolean |
isDbPasswordsEncoded() |
boolean |
isOwnNode(User user,
MMObjectNode node)
Returns whether the given node is an 'own' node.
|
protected boolean |
isStatusValid(MMObjectNode node) |
boolean |
isValid(MMObjectNode node) |
protected String |
passwordProcessorEncode(String e) |
protected String statusField
protected String userNameField
protected String passwordField
protected String defaultcontextField
protected String validFromField
protected String validToField
protected String lastLogonField
public BasicUserProvider(MMObjectBuilder ub)
public BasicUserProvider(String b)
public MMObjectNode getAnonymousUser() throws SecurityException
null if there is no such node (yet).getAnonymousUser in interface UserProviderSecurityExceptionprotected boolean isDbPasswordsEncoded()
public MMObjectNode getUser(String userName, String password, boolean encoded)
UserProvidernullgetUser in interface UserProviderencoded - Whether or not the user is requested usering the username/encodedpassword login
'type' see Authenticate.login(java.lang.String, java.util.Map<java.lang.String, ?>, java.lang.Object[]).public MMObjectNode getUser(String userName)
getUser in interface UserProviderpublic MMObjectNode getUserByRank(String rank, String userName)
UserProvidernullgetUserByRank in interface UserProviderrank - Rank to be searched. Never null.userName - Username to match or nullpublic Rank getRank(MMObjectNode userNode)
getRank in interface UserProviderprotected boolean isStatusValid(MMObjectNode node)
public boolean isValid(MMObjectNode node)
isValid in interface UserProviderpublic String encode(String e)
encode in interface UserProviderpublic MMObjectBuilder getUserBuilder()
getUserBuilder in interface UserProviderpublic String getDefaultContext(MMObjectNode node)
getDefaultContext in interface UserProvidernode - User nodeUser.getOwnerField()public boolean isOwnNode(User user, MMObjectNode node)
UserProviderisOwnNode in interface UserProviderprotected String getPasswordField()
protected String getStatusField()
protected String getUserNameField()
protected String getValidFromField()
protected String getValidToField()
protected String getLastLogonField()
protected String getDefaultContextField()
protected boolean getUserNameCaseSensitive()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}