com.atlassian.jira.security.websudo
Class InternalWebSudoManagerImpl

java.lang.Object
  extended by com.atlassian.jira.security.websudo.InternalWebSudoManagerImpl
All Implemented Interfaces:
InternalWebSudoManager

public class InternalWebSudoManagerImpl
extends Object
implements InternalWebSudoManager


Field Summary
static String WEBSUDO
           
 
Constructor Summary
InternalWebSudoManagerImpl(ApplicationProperties applicationProperties)
           
 
Method Summary
 boolean hasValidSession(javax.servlet.http.HttpSession session)
          Check if this is a valid WebSudo session.
 void invalidateSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Invalidate the current WebSudo session.
 boolean isEnabled()
           
 boolean isWebSudoRequest(javax.servlet.http.HttpServletRequest request)
          Checks if the request is a WebSudo request.
 void markWebSudoRequest(javax.servlet.http.HttpServletRequest request)
          Marks the request as a request for a WebSudo resource.
 boolean matches(Class<? extends webwork.action.Action> actionClass)
          Check if the action method should be WebSudo protected for the given requestURI.
 void startSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Start a new WebSudo session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBSUDO

public static final String WEBSUDO
See Also:
Constant Field Values
Constructor Detail

InternalWebSudoManagerImpl

public InternalWebSudoManagerImpl(ApplicationProperties applicationProperties)
Method Detail

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface InternalWebSudoManager
Returns:
true if WebSudo is enabled, false otherwise.

matches

public boolean matches(Class<? extends webwork.action.Action> actionClass)
Description copied from interface: InternalWebSudoManager
Check if the action method should be WebSudo protected for the given requestURI.

Specified by:
matches in interface InternalWebSudoManager
Parameters:
actionClass - - the current action class
Returns:
true if the action method should be WebSudo protected, false otherwise.

hasValidSession

public boolean hasValidSession(@Nullable
                               javax.servlet.http.HttpSession session)
Description copied from interface: InternalWebSudoManager
Check if this is a valid WebSudo session.

Specified by:
hasValidSession in interface InternalWebSudoManager
Parameters:
session - the current HttpSession. Can be null
Returns:
true if the HttpSession is a WebSudo session.

isWebSudoRequest

public boolean isWebSudoRequest(@Nullable
                                javax.servlet.http.HttpServletRequest request)
Description copied from interface: InternalWebSudoManager
Checks if the request is a WebSudo request.

Specified by:
isWebSudoRequest in interface InternalWebSudoManager
Parameters:
request - the current HttpServletRequest
Returns:
true if the current request is requesting a WebSudo protected web resource, false otherwise.

startSession

public void startSession(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
Description copied from interface: InternalWebSudoManager
Start a new WebSudo session. Creates a new HttpSession if necessary.

Specified by:
startSession in interface InternalWebSudoManager
Parameters:
request - the current HttpServletRequest
response - the current HttpServletResponse

markWebSudoRequest

public void markWebSudoRequest(@Nullable
                               javax.servlet.http.HttpServletRequest request)
Description copied from interface: InternalWebSudoManager
Marks the request as a request for a WebSudo resource.

Specified by:
markWebSudoRequest in interface InternalWebSudoManager
Parameters:
request - the current HttpServletRequest

invalidateSession

public void invalidateSession(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
Description copied from interface: InternalWebSudoManager
Invalidate the current WebSudo session. This does NOT invalidate the HttpSession.

Specified by:
invalidateSession in interface InternalWebSudoManager
Parameters:
request - the current HttpServletRequest
response - the current HttpServletResponse


Copyright © 2002-2013 Atlassian. All Rights Reserved.