Class AxelorWebSessionStorageEvaluator

java.lang.Object
org.apache.shiro.mgt.DefaultSessionStorageEvaluator
org.apache.shiro.web.mgt.DefaultWebSessionStorageEvaluator
com.axelor.auth.pac4j.AxelorWebSessionStorageEvaluator
All Implemented Interfaces:
org.apache.shiro.mgt.SessionStorageEvaluator

public class AxelorWebSessionStorageEvaluator extends org.apache.shiro.web.mgt.DefaultWebSessionStorageEvaluator
Session storage evaluator

Session-less clients disable session creation for the request. However, DefaultWebSessionStorageEvaluator still allows storing the subject state in a session that already exists, such as when the request also carries a session id cookie. This would authenticate that session with the session-less client credentials without renewing its id.

This implementation disables session storage whenever session creation is disabled, so that session-less logins only apply to the current request and leave any existing session untouched.

  • Constructor Details

    • AxelorWebSessionStorageEvaluator

      public AxelorWebSessionStorageEvaluator()
  • Method Details

    • isSessionStorageEnabled

      public boolean isSessionStorageEnabled(org.apache.shiro.subject.Subject subject)
      Checks whether the subject state may be stored in its session.
      Specified by:
      isSessionStorageEnabled in interface org.apache.shiro.mgt.SessionStorageEvaluator
      Overrides:
      isSessionStorageEnabled in class org.apache.shiro.web.mgt.DefaultWebSessionStorageEvaluator
      Parameters:
      subject - the subject for which session state persistence may be enabled
      Returns:
      false if session creation is disabled for the current request, otherwise the default behavior