org.mortbay.http

Class BasicAuthenticator

Implemented Interfaces:
Authenticator, Serializable
Known Direct 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)

Method Summary

Principal
authenticate(UserRealm realm, String pathInContext, HttpRequest request, HttpResponse response)
String
getAuthMethod()
void
sendChallenge(UserRealm realm, HttpResponse response)

Method Details

authenticate

public Principal authenticate(UserRealm realm,
                              String pathInContext,
                              HttpRequest request,
                              HttpResponse response)
            throws IOException
Specified by:
authenticate in interface 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.

getAuthMethod

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

sendChallenge

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

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