org.apache.turbine.modules.actions.sessionvalidator

## Class SessionValidator

- java.lang.Object
- - org.apache.turbine.modules.Assembler
  - - org.apache.turbine.modules.Action
    - - org.apache.turbine.modules.actions.sessionvalidator.SessionValidator

- Direct Known Subclasses:
    DefaultSessionValidator, TemplateSecureSessionValidator, TemplateSessionValidator

      public abstract class SessionValidator
      extends Action

  The SessionValidator attempts to retrieve the User object from the Servlet API session that is associated with the request. If the data cannot be retrieved, it is handled here. If the user has not been marked as being logged into the system, the user is rejected and the screen is set to the screen.homepage value in TurbineResources.properties.

  Other systems generally have a database table which stores this information, but we take advantage of the Servlet API here to save a hit to the database for each and every connection that a user makes.

  This action is special in that it should only be executed by the Turbine servlet.

  Version:
    $Id: SessionValidator.java 1812628 2017-10-19 12:34:25Z gk $
  Author:
    Dave Bryson

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `screenHomepage`
    `protected String` | `screenInvalidState`
    `protected SecurityService` | `security`
    `protected String` | `templateHomepage`
    `protected String` | `templateInvalidState`

    - ### Fields inherited from class org.apache.turbine.modules.Action

      `CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionValidator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `handleFormCounterToken(RunData data, boolean screenOnly)`

    - ### Methods inherited from class org.apache.turbine.modules.Action

      `doPerform, getPrefix, perform`

    - ### Methods inherited from class org.apache.turbine.modules.Assembler

      `getRunData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### security

          protected SecurityService security

    - #### templateHomepage

          protected String templateHomepage

    - #### screenHomepage

          protected String screenHomepage

    - #### templateInvalidState

          protected String templateInvalidState

    - #### screenInvalidState

          protected String screenInvalidState

  - ### Constructor Detail

    - #### SessionValidator

          public SessionValidator()

  - ### Method Detail

    - #### handleFormCounterToken

          protected void handleFormCounterToken(RunData data,
                                    boolean screenOnly)

      Parameters:
        `data` -
        `screenOnly` - `DefaultSessionValidator`

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.