|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mmhttp.server.Authenticator
public abstract class Authenticator
Base class for all authentication implementations. HTTP 1.1 allows for digest authentication whereby a username and password may be provided in the request headers. To make use of the digest authentication and require login for various parts of your site, you must provide the server with an implementation of Authenticator.
Constructor Summary | |
---|---|
Authenticator()
|
Method Summary | |
---|---|
Responder |
authenticate(Server server,
Request request,
Responder privilegedResponder)
This is the primary method used for authenticating a user for a given request. |
abstract boolean |
isAuthenticated(java.lang.String username,
java.lang.String password)
Should be overriden to validate the credentials. |
boolean |
isRestricted(Responder privilegedResponder)
Should be overridden to determine if the specifed Responder should require a valid user to be logged in. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Authenticator()
Method Detail |
---|
public Responder authenticate(Server server, Request request, Responder privilegedResponder) throws java.lang.Exception
server
- request
- privilegedResponder
-
java.lang.Exception
public boolean isRestricted(Responder privilegedResponder)
privilegedResponder
-
public abstract boolean isAuthenticated(java.lang.String username, java.lang.String password) throws java.lang.Exception
username
- password
-
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |