|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.spray.filter.DefaultFilter org.norther.tammi.spray.authenticator.AbstractAuthenticatorFilter org.norther.tammi.spray.authenticator.DefaultHttpServiceAuthFilter org.norther.tammi.spray.authenticator.DefaultHttpFormAuthFilter
public class DefaultHttpFormAuthFilter
An default implementation of HttpFormAuthFilter.
Based on FormAuthenticator
in the Apache Jakarta Tomcat project.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.norther.tammi.spray.authenticator.DefaultHttpServiceAuthFilter |
---|
DefaultHttpServiceAuthFilter.LoginStatus |
Field Summary |
---|
Fields inherited from class org.norther.tammi.spray.authenticator.DefaultHttpServiceAuthFilter |
---|
LOGIN_STATUS |
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.HttpServiceAuthFilter |
---|
FORM_AUTH |
Constructor Summary | |
---|---|
DefaultHttpFormAuthFilter()
Constructs a new filter. |
Method Summary | |
---|---|
protected Cookie |
addLoginCookie(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Adds a login cookie, if required. |
Principal |
authenticate(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Authenticates a request within the realm of this filter. |
String |
getLoginFlow()
Gets the login flow. |
String |
getLoginHost()
Gets the login host. |
protected String |
getLoginPath(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Gets the login path for the specified request. |
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. |
protected boolean |
isLoginRequest(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Checks whether the specified request is a login request. |
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 |
unauthenticated(HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
A handler for unauthenticated requests that should provide an opportunity for the user to re-authenticate himself. |
protected Principal |
verifyAuthentication(Principal identity,
HttpServletRequest request,
HttpServletResponse response,
FilterChain chain)
Verifies whether authentication is required. |
Methods inherited from class org.norther.tammi.spray.authenticator.DefaultHttpServiceAuthFilter |
---|
cacheAuthentication, getAuthType, getCookieAuthenticationAge, getLoginCheck, getLoginCookie, isAutoLoginEnabled, isQueryStringCredentialsAllowed, isSecure, isURLAuthenticationEnabled, setAutoLoginEnabled, setCookieAuthenticationAge, setQueryStringCredentialsAllowed, setSecure, setURLAuthenticationEnabled |
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.HttpServiceAuthFilter |
---|
getCookieAuthenticationAge, isQueryStringCredentialsAllowed, isSecure, isURLAuthenticationEnabled, setCookieAuthenticationAge, setQueryStringCredentialsAllowed, setSecure, setURLAuthenticationEnabled |
Methods inherited from interface javax.servlet.Filter |
---|
destroy, doFilter, init |
Constructor Detail |
---|
public DefaultHttpFormAuthFilter()
Method Detail |
---|
public String getLoginURI()
HttpFormAuthFilter
getLoginURI
in interface HttpFormAuthFilter
public void setLoginURI(String uri)
HttpFormAuthFilter
setLoginURI
in interface HttpFormAuthFilter
uri
- the login URI.public String getLoginHost()
HttpFormAuthFilter
getLoginHost
in interface HttpFormAuthFilter
public void setLoginHost(String host)
HttpFormAuthFilter
setLoginHost
in interface HttpFormAuthFilter
host
- the login host.public String getLoginService()
HttpFormAuthFilter
getLoginService
in interface HttpFormAuthFilter
public void setLoginService(String service)
HttpFormAuthFilter
setLoginService
in interface HttpFormAuthFilter
service
- the login service.public String getLoginPipe()
HttpFormAuthFilter
getLoginPipe
in interface HttpFormAuthFilter
public void setLoginPipe(String pipe)
HttpFormAuthFilter
setLoginPipe
in interface HttpFormAuthFilter
pipe
- the login pipe.public String getLoginFlow()
HttpFormAuthFilter
getLoginFlow
in interface HttpFormAuthFilter
public void setLoginFlow(String flow)
HttpFormAuthFilter
setLoginFlow
in interface HttpFormAuthFilter
flow
- the login flow.public String getLoginTemplate()
HttpFormAuthFilter
getLoginTemplate
in interface HttpFormAuthFilter
public void setLoginTemplate(String template)
HttpFormAuthFilter
setLoginTemplate
in interface HttpFormAuthFilter
template
- the login template.public StringBuilder getLoginURL(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
HttpFormAuthFilter
getLoginURL
in interface HttpFormAuthFilter
request
- the request.response
- the response.chain
- the filter chain.
public Principal authenticate(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
AuthenticatorFilter
authenticate
in interface AuthenticatorFilter
authenticate
in class DefaultHttpServiceAuthFilter
request
- 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 AuthenticatorFilter
unauthenticated
in class DefaultHttpServiceAuthFilter
request
- the request.response
- the response.chain
- the filter chain.
ServletException
- for servlet errors.
IOException
- for general errors.protected boolean isLoginRequest(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
DefaultHttpServiceAuthFilter
isLoginRequest
in class DefaultHttpServiceAuthFilter
request
- the request.response
- the response.chain
- the filter chain.
protected String getLoginPath(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
DefaultHttpServiceAuthFilter
getLoginPath
in class DefaultHttpServiceAuthFilter
request
- the request.response
- the response.chain
- the filter chain.
protected Cookie addLoginCookie(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
DefaultHttpServiceAuthFilter
addLoginCookie
in class DefaultHttpServiceAuthFilter
request
- the request.response
- the response.chain
- the filter chain.
protected Principal verifyAuthentication(Principal identity, HttpServletRequest request, HttpServletResponse response, FilterChain chain)
AbstractAuthenticatorFilter
verifyAuthentication
in class AbstractAuthenticatorFilter
identity
- the authenticated principal.request
- the request.response
- the response.chain
- the filter chain.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |