com.atlassian.crowd.integration.xwork
Class CrowdAuthenticationInterceptor

java.lang.Object
  extended by com.atlassian.crowd.integration.xwork.CrowdAuthenticationInterceptor
All Implemented Interfaces:
com.opensymphony.xwork.interceptor.Interceptor, java.io.Serializable

public class CrowdAuthenticationInterceptor
extends java.lang.Object
implements com.opensymphony.xwork.interceptor.Interceptor

This interceptor manages protecting a web.xml url-pattern. If the requesting principal does not have a valid token, they will be redirected to the authentication path specified in the crowd.properties configuration file. Additional values are stored to the principal's session such as their originally requested URL should their authentication be found invalid.

See Also:
Serialized Form

Field Summary
static java.lang.String ORIGINAL_URL
          The session key stored as a String, is the requested secure url before redirect to the authentication page.
 
Constructor Summary
CrowdAuthenticationInterceptor()
          Use this default constructor if you are not using an IoC managed HttpAuthenticator/SecurityServerClient.
CrowdAuthenticationInterceptor(HttpAuthenticator httpAuthenticator)
          Use this constructor to provide an externally managed singleton instance of the HttpAuthenticator.
 
Method Summary
 void destroy()
           
 void init()
           
 java.lang.String intercept(com.opensymphony.xwork.ActionInvocation actionInvocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORIGINAL_URL

public static final java.lang.String ORIGINAL_URL
The session key stored as a String, is the requested secure url before redirect to the authentication page.

Constructor Detail

CrowdAuthenticationInterceptor

public CrowdAuthenticationInterceptor()
Use this default constructor if you are not using an IoC managed HttpAuthenticator/SecurityServerClient. This will delegate calls to HttpAuthenticatorFactory when an instance of the HttpAuthenticator is required.


CrowdAuthenticationInterceptor

public CrowdAuthenticationInterceptor(HttpAuthenticator httpAuthenticator)
Use this constructor to provide an externally managed singleton instance of the HttpAuthenticator.

This should be used if you are using an IoC container to manage the HttpAuthenticator/SecurityServerClient instances. This should NOT be used if you are using the HttpAuthenticatorFactory or SecurityServerClientFactory anywhere in your application.

Parameters:
httpAuthenticator - externally managed singleton.
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface com.opensymphony.xwork.interceptor.Interceptor

init

public void init()
Specified by:
init in interface com.opensymphony.xwork.interceptor.Interceptor

intercept

public java.lang.String intercept(com.opensymphony.xwork.ActionInvocation actionInvocation)
                           throws java.lang.Exception
Specified by:
intercept in interface com.opensymphony.xwork.interceptor.Interceptor
Throws:
java.lang.Exception


Copyright © 2010 Atlassian. All Rights Reserved.