org.mortbay.jetty.servlet

Class FormAuthenticator

Implemented Interfaces:
Authenticator, Serializable

public class FormAuthenticator
extends java.lang.Object
implements Authenticator

FORM Authentication Authenticator. The HTTP Session is used to store the authentication status of the user, which can be distributed. If the realm implements SSORealm, SSO is supported.
Version:
$Id: FormAuthenticator.java,v 1.32 2005/08/13 00:01:27 gregwilkins Exp $
Authors:
Greg Wilkins (gregw)
dan@greening.name

Field Summary

static String
__J_AUTHENTICATED
static String
__J_PASSWORD
static String
__J_SECURITY_CHECK
static String
__J_URI
static String
__J_USERNAME

Method Summary

Principal
authenticate(UserRealm realm, String pathInContext, HttpRequest httpRequest, HttpResponse httpResponse)
Perform form authentication.
String
getAuthMethod()
String
getErrorPage()
String
getLoginPage()
boolean
isLoginOrErrorPage(String pathInContext)
void
setErrorPage(String path)
void
setLoginPage(String path)

Field Details

__J_AUTHENTICATED

public static final String __J_AUTHENTICATED

__J_PASSWORD

public static final String __J_PASSWORD

__J_SECURITY_CHECK

public static final String __J_SECURITY_CHECK

__J_URI

public static final String __J_URI

__J_USERNAME

public static final String __J_USERNAME

Method Details

authenticate

public Principal authenticate(UserRealm realm,
                              String pathInContext,
                              HttpRequest httpRequest,
                              HttpResponse httpResponse)
            throws IOException
Perform form authentication. Called from SecurityHandler.
Specified by:
authenticate in interface Authenticator
Returns:
UserPrincipal if authenticated else null.

getAuthMethod

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

getErrorPage

public String getErrorPage()

getLoginPage

public String getLoginPage()

isLoginOrErrorPage

public boolean isLoginOrErrorPage(String pathInContext)

setErrorPage

public void setErrorPage(String path)

setLoginPage

public void setLoginPage(String path)

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