Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.action.interceptor
Class AuthInterceptor

java.lang.Object
  extended by com.jivesoftware.base.action.interceptor.AuthInterceptor
All Implemented Interfaces:
com.opensymphony.xwork.interceptor.Interceptor, java.io.Serializable
Direct Known Subclasses:
AdminAuthInterceptor, ForumAuthInterceptor

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

Handles setup of the AuthToken and provides actions the ability to acquire the AuthToken and User object via the AuthTokenAware and UserAware interfaces.

See Also:
Serialized Form

Constructor Summary
AuthInterceptor()
           
 
Method Summary
 void destroy()
           
protected  AuthToken getAuthToken(com.opensymphony.xwork.ActionInvocation ai)
          Returns the AuthToken of the page user.
protected abstract  UserManager getUserManager(AuthToken authToken)
          Returns a UserManager given an authToken.
 void init()
           
 java.lang.String intercept(com.opensymphony.xwork.ActionInvocation ai)
           
protected  void processAwareInterfaces(com.opensymphony.xwork.ActionInvocation ai, AuthToken authToken, java.lang.Object action)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthInterceptor

public AuthInterceptor()
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 ai)
                           throws java.lang.Exception
Specified by:
intercept in interface com.opensymphony.xwork.interceptor.Interceptor
Throws:
java.lang.Exception

processAwareInterfaces

protected void processAwareInterfaces(com.opensymphony.xwork.ActionInvocation ai,
                                      AuthToken authToken,
                                      java.lang.Object action)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getUserManager

protected abstract UserManager getUserManager(AuthToken authToken)
Returns a UserManager given an authToken. THe returned UserManager should be a proxy object.

Parameters:
authToken - the authToken for got page user
Returns:
a UserManager

getAuthToken

protected AuthToken getAuthToken(com.opensymphony.xwork.ActionInvocation ai)
Returns the AuthToken of the page user. If the page user is a guest then the auth token is anonymous (such that getAuthToken().isAnonymous() == true).

Returns:
the page user's AuthToken
See Also:
AuthToken

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.