org.mortbay.http
Class BasicAuthenticator

java.lang.Object
  extended byorg.mortbay.http.BasicAuthenticator
All Implemented Interfaces:
Authenticator, java.io.Serializable
Direct Known Subclasses:
BasicAuthenticator

public class BasicAuthenticator
extends java.lang.Object
implements Authenticator

BASIC authentication.

Version:
$Id: BasicAuthenticator.java,v 1.17 2005/08/13 00:01:24 gregwilkins Exp $
Author:
Greg Wilkins (gregw)
See Also:
Serialized Form

Constructor Summary
BasicAuthenticator()
           
 
Method Summary
 java.security.Principal authenticate(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

authenticate

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

Specified by:
authenticate in interface Authenticator
Parameters:
realm - an UserRealm value
pathInContext - a String value
request - a HttpRequest value
response - a HttpResponse 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:
java.io.IOException

getAuthMethod

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

sendChallenge

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


Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.