org.mortbay.http
Class BasicAuthenticator

java.lang.Object
  |
  +--org.mortbay.http.BasicAuthenticator
All Implemented Interfaces:
SecurityConstraint.Authenticator, java.io.Serializable

public class BasicAuthenticator
extends java.lang.Object
implements SecurityConstraint.Authenticator

BASIC authentication.

Version:
$Id: BasicAuthenticator.java,v 1.8 2002/12/14 13:02:49 bretts Exp $
Author:
Greg Wilkins (gregw)
See Also:
Serialized Form

Constructor Summary
BasicAuthenticator()
           
 
Method Summary
 UserPrincipal authenticated(UserRealm realm, java.lang.String pathInContext, HttpRequest request, HttpResponse response)
          Authenticate.
 java.lang.String getAuthMethod()
           
 void sendChallenge(UserRealm realm, HttpResponse response)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthenticator

public BasicAuthenticator()
Method Detail

authenticated

public UserPrincipal authenticated(UserRealm realm,
                                   java.lang.String pathInContext,
                                   HttpRequest request,
                                   HttpResponse response)
                            throws java.io.IOException
Description copied from interface: SecurityConstraint.Authenticator
Authenticate.

Specified by:
authenticated in interface SecurityConstraint.Authenticator
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:
java.io.IOException

getAuthMethod

public java.lang.String getAuthMethod()
Specified by:
getAuthMethod in interface SecurityConstraint.Authenticator

sendChallenge

public void sendChallenge(UserRealm realm,
                          HttpResponse response)
                   throws java.io.IOException
java.io.IOException


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.