|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectecologylab.generic.Debug
ecologylab.services.authentication.Authenticator<A>
public class Authenticator<A extends AuthenticationListEntry>
Encapsulates all authentication actions, so that Servers don't need to. Requires a backend database of users with passwords (an AuthenticationList).
| Field Summary | |
|---|---|
protected AuthenticationList<A> |
authList
|
| Constructor Summary | |
|---|---|
Authenticator(AuthenticationList<A> source)
Creates a new Authenticator using the given AuthenticationList as a backend database of usernames and passwords. |
|
| Method Summary | |
|---|---|
protected void |
add(java.lang.String username,
java.lang.String sessionId)
|
boolean |
isLoggedIn(java.lang.String username)
Checks to see if the given username is already logged-in. |
boolean |
login(A entry,
java.lang.String sessionId)
Attempts to log-in the given AuthenticationListEntry object. |
boolean |
logout(A entry,
java.lang.String sessionId)
Removes the given username from all authenticated client lists if the IP address matches the one currently stored for the entry. |
protected void |
remove(java.lang.String username)
|
void |
removeBySessionId(java.lang.Object sessionId)
|
java.util.Set<java.lang.String> |
usersLoggedIn(A administrator)
Looks up a list of logged-in users for an administrator. |
int |
verifyCredentials(A entry)
Looks up the authentication level, if any, of entry. |
| Methods inherited from class ecologylab.generic.Debug |
|---|
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected AuthenticationList<A extends AuthenticationListEntry> authList
| Constructor Detail |
|---|
public Authenticator(AuthenticationList<A> source)
source - -
the AuthenticationList of usernames and passwords to use for authentication.| Method Detail |
|---|
public boolean login(A entry,
java.lang.String sessionId)
entry - -
the AuthenticationListEntry containing a username and password that is attempting to authenticate.
public int verifyCredentials(A entry)
entry - -
an instance of a subclass of AuthenticationListEntry with a username and password.
public java.util.Set<java.lang.String> usersLoggedIn(A administrator)
administrator - -
the username and password of an administrator.
public boolean logout(A entry,
java.lang.String sessionId)
entry - public boolean isLoggedIn(java.lang.String username)
username -
protected void remove(java.lang.String username)
public void removeBySessionId(java.lang.Object sessionId)
protected void add(java.lang.String username,
java.lang.String sessionId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||