org.mortbay.jetty.security
Class BasicAuthenticator

java.lang.Object
  extended by org.mortbay.jetty.security.BasicAuthenticator
All Implemented Interfaces:
Serializable, Authenticator

public class BasicAuthenticator
extends Object
implements Authenticator

BASIC authentication.

Author:
Greg Wilkins (gregw)
See Also:
Serialized Form

Constructor Summary
BasicAuthenticator()
           
 
Method Summary
 Principal authenticate(UserRealm realm, String pathInContext, Request request, Response response)
          Authenticate.
 String getAuthMethod()
           
 void sendChallenge(UserRealm realm, Response response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthenticator

public BasicAuthenticator()
Method Detail

authenticate

public Principal authenticate(UserRealm realm,
                              String pathInContext,
                              Request request,
                              Response response)
                       throws IOException
Description copied from interface: Authenticator
Authenticate.

Specified by:
authenticate in interface Authenticator
Parameters:
realm - an UserRealm value
pathInContext - a String value
request - a Request value
response - a Response value. If non-null response is passed, then a failed authentication will result in a challenge response being set in the response.
Returns:
UserPrinciple if authenticated or null if not. If Authentication fails, then the authenticator may have committed the response as an auth challenge or redirect.
Throws:
IOException

getAuthMethod

public String getAuthMethod()
Specified by:
getAuthMethod in interface Authenticator

sendChallenge

public void sendChallenge(UserRealm realm,
                          Response response)
                   throws IOException
Throws:
IOException