|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.ui.AbstractProcessingFilter
org.acegisecurity.ui.webapp.AuthenticationProcessingFilter
org.acegisecurity.ui.webapp.SiteminderAuthenticationProcessingFilter
public class SiteminderAuthenticationProcessingFilter
Extends Acegi's AuthenticationProcessingFilter to pick up Netegrity Siteminder's headers.
Also provides a backup form-based authentication and the ability set source key names.
Siteminder must present two headers to this filter, a username and password. You must set the header keys before this filter is used for authentication, otherwise Siteminder checks will be skipped. If the Siteminder check is unsuccessful (i.e. if the headers are not found), then the form parameters will be checked (see next paragraph). This allows applications to optionally function even when their Siteminder infrastructure is unavailable, as is often the case during development.
Login forms must present two parameters to this filter: a
username and password. If not specified, the parameter names to use are
contained in the static fields AuthenticationProcessingFilter.ACEGI_SECURITY_FORM_USERNAME_KEY
and AuthenticationProcessingFilter.ACEGI_SECURITY_FORM_PASSWORD_KEY.
Do not use this class directly. Instead, configure
web.xml to use the FilterToBeanProxy.
| Field Summary |
|---|
| Fields inherited from class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter |
|---|
ACEGI_SECURITY_FORM_PASSWORD_KEY, ACEGI_SECURITY_FORM_USERNAME_KEY, ACEGI_SECURITY_LAST_USERNAME_KEY |
| Fields inherited from class org.acegisecurity.ui.AbstractProcessingFilter |
|---|
ACEGI_SECURITY_LAST_EXCEPTION_KEY, ACEGI_SECURITY_TARGET_URL_KEY, logger, messages |
| Constructor Summary | |
|---|---|
SiteminderAuthenticationProcessingFilter()
Basic constructor. |
|
| Method Summary | |
|---|---|
Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request)
Performs actual authentication. |
String |
getDefaultFilterProcessesUrl()
This filter by default responds to /j_acegi_security_check. |
String |
getFormPasswordParameterKey()
Returns the form password parameter key. |
String |
getFormUsernameParameterKey()
Returns the form username parameter key. |
String |
getSiteminderPasswordHeaderKey()
Returns the Siteminder password header key. |
String |
getSiteminderUsernameHeaderKey()
Returns the Siteminder username header key. |
void |
init(javax.servlet.FilterConfig filterConfig)
Does nothing. |
protected String |
obtainPassword(javax.servlet.http.HttpServletRequest request)
Enables subclasses to override the composition of the password, such as by including additional values and a separator. |
protected void |
setDetails(javax.servlet.http.HttpServletRequest request,
UsernamePasswordAuthenticationToken authRequest)
Provided so that subclasses may configure what is put into the authentication request's details property. |
void |
setFormPasswordParameterKey(String key)
Sets the form password parameter key. |
void |
setFormUsernameParameterKey(String key)
Sets the form username parameter key. |
void |
setSiteminderPasswordHeaderKey(String key)
Sets the Siteminder password header key. |
void |
setSiteminderUsernameHeaderKey(String key)
Sets the Siteminder username header key. |
| Methods inherited from class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter |
|---|
obtainUsername |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SiteminderAuthenticationProcessingFilter()
| Method Detail |
|---|
public Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request)
throws AuthenticationException
AbstractProcessingFilter
attemptAuthentication in class AuthenticationProcessingFilterrequest - from which to extract parameters and perform the
authentication
AuthenticationException - if authentication failsAbstractProcessingFilter.attemptAuthentication(javax.servlet.http.HttpServletRequest)public String getDefaultFilterProcessesUrl()
/j_acegi_security_check.
getDefaultFilterProcessesUrl in class AuthenticationProcessingFilterpublic String getFormPasswordParameterKey()
public String getFormUsernameParameterKey()
public String getSiteminderPasswordHeaderKey()
public String getSiteminderUsernameHeaderKey()
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
AbstractProcessingFilter
init in interface javax.servlet.Filterinit in class AuthenticationProcessingFilterfilterConfig - ignored
javax.servlet.ServletException - ignoredFilter.init(javax.servlet.FilterConfig)protected String obtainPassword(javax.servlet.http.HttpServletRequest request)
This might be used for example if a postcode/zipcode was required in
addition to the password. A delimiter such as a pipe (|) should be used
to separate the password and extended value(s). The
AuthenticationDao will need to generate the expected
password in a corresponding manner.
obtainPassword in class AuthenticationProcessingFilterrequest - so that request attributes can be retrieved
Authentication request token to the
AuthenticationManager
protected void setDetails(javax.servlet.http.HttpServletRequest request,
UsernamePasswordAuthenticationToken authRequest)
WebAuthenticationDetails.
setDetails in class AuthenticationProcessingFilterrequest - that an authentication request is being created forauthRequest - the authentication request object that should have
its details setpublic void setFormPasswordParameterKey(String key)
key - The form password parameter key.public void setFormUsernameParameterKey(String key)
key - The form username parameter key.public void setSiteminderPasswordHeaderKey(String key)
key - The Siteminder password header key.public void setSiteminderUsernameHeaderKey(String key)
key - The Siteminder username header key.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||