|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.spray.filter.DefaultFilter
org.norther.tammi.spray.authenticator.AbstractAuthenticatorFilter
org.norther.tammi.spray.authenticator.DefaultHttpFormAuthFilter
public class DefaultHttpFormAuthFilter
An implementation of the FORM BASED authentication.
Based on FormAuthenticator in the Apache Jakarta Tomcat
project.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.spray.authenticator.AbstractAuthenticatorFilter |
|---|
DEFAULT_USER_ACCOUNT_ID_ATTIBUTE |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.spray.authenticator.HttpFormAuthFilter |
|---|
FORM_AUTH |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultHttpFormAuthFilter()
Constructs a new filter. |
|
| Method Summary | |
|---|---|
Principal |
authenticate(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Authenticates a request within the realm of this filter. |
String |
getAuthType()
Gets the authentication scheme. |
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 |
isAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Checks whether automatic login is enabled for the specified request. |
boolean |
isSecure()
Checks whether authentication should apply a secure connection. |
void |
setAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain,
boolean flag)
Sets whether automatic login is enabled for the specified request. |
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. |
void |
unauthenticated(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
A handler for unauthenticated requests that should provide an opportunity for the user to re-authenticate himself. |
| Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter |
|---|
destroy, getFilterConfig, getRequestMap, getSessionMap, init |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.spray.authenticator.AuthenticatorFilter |
|---|
getDefaultDomain, getFaultyUser, getLoginAttempts, getLoginAttempts, getLogoutFlow, getLogoutHost, getLogoutPipe, getLogoutService, getLogoutTemplate, getLogoutURI, getLogoutURL, getPublicRealmName, getRealmName, getUnauthorizedTemplate, isAuthenticationRequired, isCachedPrincipalDiscarded, isUserInRole, setAuthenticationRequired, setCachedPrincipalDiscarded, setDefaultDomain, setLoginAttempts, setLogoutFlow, setLogoutHost, setLogoutPipe, setLogoutService, setLogoutTemplate, setLogoutURI, setPublicRealmName, setRealmName, setUnauthorizedTemplate |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, doFilter, init |
| Constructor Detail |
|---|
public DefaultHttpFormAuthFilter()
| Method Detail |
|---|
public String getAuthType()
AuthenticatorFilter
getAuthType in interface AuthenticatorFiltergetAuthType in class AbstractAuthenticatorFilterpublic boolean isSecure()
HttpFormAuthFilter
isSecure in interface HttpFormAuthFilterpublic void setSecure(boolean flag)
HttpFormAuthFilter
setSecure in interface HttpFormAuthFilterflag - true for a secure authentication, false otherwise.public int getLoginAge()
HttpFormAuthFilter
getLoginAge in interface HttpFormAuthFilterpublic void setLoginAge(int secs)
HttpFormAuthFilter
setLoginAge in interface HttpFormAuthFiltersecs - the age in seconds.public String getLoginURI()
HttpFormAuthFilter
getLoginURI in interface HttpFormAuthFilterpublic void setLoginURI(String uri)
HttpFormAuthFilter
setLoginURI in interface HttpFormAuthFilteruri - the login URI.public String getLoginHost()
HttpFormAuthFilter
getLoginHost in interface HttpFormAuthFilterpublic void setLoginHost(String host)
HttpFormAuthFilter
setLoginHost in interface HttpFormAuthFilterhost - the login host.public String getLoginService()
HttpFormAuthFilter
getLoginService in interface HttpFormAuthFilterpublic void setLoginService(String service)
HttpFormAuthFilter
setLoginService in interface HttpFormAuthFilterservice - the login service.public String getLoginPipe()
HttpFormAuthFilter
getLoginPipe in interface HttpFormAuthFilterpublic void setLoginPipe(String pipe)
HttpFormAuthFilter
setLoginPipe in interface HttpFormAuthFilterpipe - the login pipe.public String getLoginFlow()
HttpFormAuthFilter
getLoginFlow in interface HttpFormAuthFilterpublic void setLoginFlow(String flow)
HttpFormAuthFilter
setLoginFlow in interface HttpFormAuthFilterflow - the login flow.public String getLoginTemplate()
HttpFormAuthFilter
getLoginTemplate in interface HttpFormAuthFilterpublic void setLoginTemplate(String template)
HttpFormAuthFilter
setLoginTemplate in interface HttpFormAuthFiltertemplate - the login template.
public StringBuilder getLoginURL(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
HttpFormAuthFilter
getLoginURL in interface HttpFormAuthFilterrequest - the request.response - the response.chain - the filter chain.
public Principal authenticate(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
AuthenticatorFilter
authenticate in interface AuthenticatorFilterauthenticate in class AbstractAuthenticatorFilterrequest - the request.response - the response.chain - the filter chain.
public void unauthenticated(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
throws ServletException,
IOException
AuthenticatorFilter
unauthenticated in interface AuthenticatorFilterunauthenticated in class AbstractAuthenticatorFilterrequest - the request.response - the response.chain - the filter chain.
ServletException - for servlet errors.
IOException - for general errors.
public boolean isAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
AuthenticatorFilter
isAutoLoginEnabled in interface AuthenticatorFilterisAutoLoginEnabled in class AbstractAuthenticatorFilterrequest - the request.response - the response.chain - the filter chain.
public void setAutoLoginEnabled(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain,
boolean flag)
AuthenticatorFilter
setAutoLoginEnabled in interface AuthenticatorFiltersetAutoLoginEnabled in class AbstractAuthenticatorFilterrequest - the request.response - the response.chain - the filter chain.flag - true if enabled, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||