org.norther.tammi.spray.authenticator
Interface HttpFormAuthFilter

All Superinterfaces:
AuthenticatorFilter, Filter
All Known Implementing Classes:
DefaultHttpFormAuthFilter

public interface HttpFormAuthFilter
extends AuthenticatorFilter

An interface to FORM BASED authentication as described in the Servlet API Specification Version 2.3.

Based on Authenticator in the Apache Jakarta Tomcat project.

Author:
Craig R. McClanahan, Ilkka Priha

Field Summary
static String FORM_AUTH
          Form authentication.
 
Method Summary
 int getLoginAge()
          Gets the max age of the login.
 String getLoginFlow()
          Gets the login flow.
 String getLoginHost()
          Gets the login host.
 String getLoginPipe()
          Gets the login pipe.
 String getLoginService()
          Gets the login service.
 String getLoginTemplate()
          Gets the login template.
 String getLoginURI()
          Gets the login URI.
 StringBuilder getLoginURL(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
          Gets the login URL, with the scheme, host and port if required, for the specified request.
 boolean isSecure()
          Checks whether authentication should apply a secure connection.
 void setLoginAge(int secs)
          Sets the max age of the login.
 void setLoginFlow(String flow)
          Sets the login flow.
 void setLoginHost(String host)
          Sets the login host.
 void setLoginPipe(String pipe)
          Sets the login pipe.
 void setLoginService(String service)
          Sets the login service.
 void setLoginTemplate(String template)
          Sets the login template.
 void setLoginURI(String uri)
          Sets the login URI.
 void setSecure(boolean flag)
          Sets whether authentication should apply a secure connection.
 
Methods inherited from interface org.norther.tammi.spray.authenticator.AuthenticatorFilter
authenticate, getAuthType, getDefaultDomain, getFaultyUser, getLoginAttempts, getLoginAttempts, getLogoutFlow, getLogoutHost, getLogoutPipe, getLogoutService, getLogoutTemplate, getLogoutURI, getLogoutURL, getPublicRealmName, getRealmName, getUnauthorizedTemplate, isAuthenticationRequired, isAutoLoginEnabled, isCachedPrincipalDiscarded, isUserInRole, setAuthenticationRequired, setAutoLoginEnabled, setCachedPrincipalDiscarded, setDefaultDomain, setLoginAttempts, setLogoutFlow, setLogoutHost, setLogoutPipe, setLogoutService, setLogoutTemplate, setLogoutURI, setPublicRealmName, setRealmName, setUnauthorizedTemplate, unauthenticated
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 

Field Detail

FORM_AUTH

static final String FORM_AUTH
Form authentication.

See Also:
Constant Field Values
Method Detail

isSecure

boolean isSecure()
Checks whether authentication should apply a secure connection.

Returns:
true for a secure authentication, false otherwise.

setSecure

void setSecure(boolean flag)
Sets whether authentication should apply a secure connection.

Parameters:
flag - true for a secure authentication, false otherwise.

getLoginAge

int getLoginAge()
Gets the max age of the login.

Returns:
the age in seconds.

setLoginAge

void setLoginAge(int secs)
Sets the max age of the login. If >0, the authentication is cached in a cookie and reused during the next login attempt.

Parameters:
secs - the age in seconds.

getLoginURI

String getLoginURI()
Gets the login URI.

Returns:
the login URI.

setLoginURI

void setLoginURI(String uri)
Sets the login URI. An explicit URI overrides the login host, service, pipe, template and flow.

Parameters:
uri - the login URI.

getLoginHost

String getLoginHost()
Gets the login host.

Returns:
the login host.

setLoginHost

void setLoginHost(String host)
Sets the login host.

Parameters:
host - the login host.

getLoginService

String getLoginService()
Gets the login service.

Returns:
the login service.

setLoginService

void setLoginService(String service)
Sets the login service. The service is applied to the login URI if an explicit one is not specified.

Parameters:
service - the login service.

getLoginPipe

String getLoginPipe()
Gets the login pipe.

Returns:
the login pipe.

setLoginPipe

void setLoginPipe(String pipe)
Sets the login pipe. The pipe is applied to the login URI if an explicit one is not specified.

Parameters:
pipe - the login pipe.

getLoginFlow

String getLoginFlow()
Gets the login flow.

Returns:
the login flow.

setLoginFlow

void setLoginFlow(String flow)
Sets the login flow. The flow is applied to the login URI if an explicit one is not specified.

Parameters:
flow - the login flow.

getLoginTemplate

String getLoginTemplate()
Gets the login template.

Returns:
the login template.

setLoginTemplate

void setLoginTemplate(String template)
Sets the login template. The template is applied to the login URI if an explicit one is not specified.

Parameters:
template - the login template.

getLoginURL

StringBuilder getLoginURL(HttpServletRequest request,
                          HttpServletResponse response,
                          FilterChain chain)
Gets the login URL, with the scheme, host and port if required, for the specified request.

Parameters:
request - the request.
response - the response.
chain - the filter chain.
Returns:
the login URL or null if not defined.


Copyright © 2004 The Norther Organization. All rights reserved.