|
||||||||||
| 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
com.atlassian.crowd.integration.acegi.CrowdSSOAuthenticationProcessingFilter
public class CrowdSSOAuthenticationProcessingFilter
The CrowdSSOAuthenticationProcessingFilter is to be used in conjunction with the CrowdAuthenticationProvider to provide SSO authentication. If single sign-on is not required, centralised authentication can still be acheived by using the default AuthenticationProcessingFilter in conjunction with the CrowdAuthenticationProvider.
| 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_SAVED_REQUEST_KEY, ACEGI_SECURITY_LAST_EXCEPTION_KEY, authenticationDetailsSource, eventPublisher, logger, messages |
| Constructor Summary | |
|---|---|
CrowdSSOAuthenticationProcessingFilter()
|
|
| Method Summary | |
|---|---|
protected void |
doSetDetails(javax.servlet.http.HttpServletRequest request,
org.acegisecurity.providers.AbstractAuthenticationToken authRequest)
|
protected void |
onSuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.Authentication authResult)
Attempts to write out the successful SSO token to a cookie, if an SSO token was generated and stored via the AuthenticationProvider. |
protected void |
onUnsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
Attempts to remove any SSO tokens associated with the request, effectively logging the user out of Crowd. |
protected boolean |
requiresAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This filter will process all requests, however, if the filterProcessesUrl is part of the request URI, the filter will assume the request is a username/password authentication (login) request and will not check for Crowd SSO authentication. |
protected void |
setDetails(javax.servlet.http.HttpServletRequest request,
org.acegisecurity.providers.UsernamePasswordAuthenticationToken authRequest)
Provided so that subclasses may configure what is put into the authentication request's details property. |
void |
setHttpAuthenticator(HttpAuthenticator httpAuthenticator)
Mandatory dependency. |
void |
setRequestToApplicationMapper(RequestToApplicationMapper requestToApplicationMapper)
Optional dependency. |
| Methods inherited from class org.acegisecurity.ui.webapp.AuthenticationProcessingFilter |
|---|
attemptAuthentication, getDefaultFilterProcessesUrl, init, obtainPassword, obtainUsername |
| Methods inherited from class org.acegisecurity.ui.AbstractProcessingFilter |
|---|
afterPropertiesSet, destroy, determineFailureUrl, determineTargetUrl, doFilter, getAuthenticationDetailsSource, getAuthenticationFailureUrl, getAuthenticationManager, getDefaultTargetUrl, getExceptionMappings, getFilterProcessesUrl, getRememberMeServices, isAlwaysUseDefaultTargetUrl, isContinueChainBeforeSuccessfulAuthentication, obtainFullRequestUrl, onPreAuthentication, sendRedirect, setAlwaysUseDefaultTargetUrl, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureUrl, setAuthenticationManager, setBufferSize, setContinueChainBeforeSuccessfulAuthentication, setDefaultTargetUrl, setExceptionMappings, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setUseRelativeContext, successfulAuthentication, unsuccessfulAuthentication |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CrowdSSOAuthenticationProcessingFilter()
| Method Detail |
|---|
protected boolean requiresAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
requiresAuthentication in class org.acegisecurity.ui.AbstractProcessingFilterrequest - servlet request containing either username/password paramaters
or the Crowd token as a cookie.response - servlet response to write out cookie.
true only if the filterProcessesUrl is in the request URI.
protected void setDetails(javax.servlet.http.HttpServletRequest request,
org.acegisecurity.providers.UsernamePasswordAuthenticationToken authRequest)
setDetails in class org.acegisecurity.ui.webapp.AuthenticationProcessingFilterrequest - that an authentication request is being created forauthRequest - the authentication request object that should have its details set
protected void doSetDetails(javax.servlet.http.HttpServletRequest request,
org.acegisecurity.providers.AbstractAuthenticationToken authRequest)
protected void onSuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.Authentication authResult)
throws java.io.IOException
onSuccessfulAuthentication in class org.acegisecurity.ui.AbstractProcessingFilterrequest - servlet request.response - servlet response.authResult - result of a successful authentication. If it is a CrowdSSOAuthenticationToken
then the SSO token will be set to the "credentials" property.
java.io.IOException - not thrown.
protected void onUnsuccessfulAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.acegisecurity.AuthenticationException failed)
throws java.io.IOException
onUnsuccessfulAuthentication in class org.acegisecurity.ui.AbstractProcessingFilterrequest - servlet request.response - servlet response.failed - not required.
java.io.IOException - not thrown.public void setHttpAuthenticator(HttpAuthenticator httpAuthenticator)
httpAuthenticator - used to extract validation factors, set cookies and perform logouts.public void setRequestToApplicationMapper(RequestToApplicationMapper requestToApplicationMapper)
requestToApplicationMapper - only required if multiple Crowd "applications" need to
be accessed via the same Acegi context, eg. when one web-application corresponds to
multiple Crowd "applications".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||