|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jwall.web.audit.util.SimplePasswordAuthenticator
public class SimplePasswordAuthenticator
| Constructor Summary | |
|---|---|
SimplePasswordAuthenticator(Properties usersFile,
Properties groupFile)
This creates a new authenticator which reads users from the given file usersFile. |
|
SimplePasswordAuthenticator(Properties usersFile,
Properties groupFile,
MessageDigest messageDigest)
This creates a new authenticator in the same manner as the above constructor does. |
|
| Method Summary | |
|---|---|
boolean |
authenticate(String login,
String password)
This method checks the given login and password to the internal user-information. |
List<String> |
getRoles(String user)
This method returns the list of groups which the user sepcified by login
belongs to. |
boolean |
isUserInRole(String user,
String role)
This method returns if the given user ( user) is a member of the
specified group (role). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimplePasswordAuthenticator(Properties usersFile,
Properties groupFile)
usersFile.
The group information is read from groupFile.
The user file is expected to have one line of the format
user=password
for each user. The password is supposed to be in plaintext. The group file is supposed to have a
line for each group, i.e.
group1=user1,user2,user3
Similar to the standard unix password/group format.
usersFile - groupFile -
IOException
public SimplePasswordAuthenticator(Properties usersFile,
Properties groupFile,
MessageDigest messageDigest)
usersFile - groupFile - messageDigest -
IOException| Method Detail |
|---|
public boolean authenticate(String login,
String password)
authenticate in interface Authenticatorlogin - The login of the user to authenticate.password - The password used for authentication.
true, if the user exists and the password equals the one
stored within the authenticator.Authenticator.authenticate(java.lang.String, java.lang.String)public List<String> getRoles(String user)
Authenticatorlogin
belongs to.
getRoles in interface Authenticatoruser - The user's login.
Authenticator.getRoles(java.lang.String)
public boolean isUserInRole(String user,
String role)
Authenticatoruser) is a member of the
specified group (role).
isUserInRole in interface Authenticatoruser - The user to check.role - The group to check.
true, if the users is a member of the given group.Authenticator.isUserInRole(java.lang.String, java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||