Class SessionPropertyUpgrader

    • Constructor Detail

      • SessionPropertyUpgrader

        public SessionPropertyUpgrader()
    • Method Detail

      • loadPropertyUpgrader

        public static SessionPropertyUpgrader loadPropertyUpgrader()
        Attempts to load the configured session property upgrader class.
      • populateProperties

        public final void populateProperties​(org.forgerock.openam.session.Session oldSession,
                                             com.iplanet.dpro.session.service.SessionBuilder newSession,
                                             boolean forceAuth)
                                      throws com.iplanet.dpro.session.SessionException
        Entry point for LoginState. This method is called during session upgrade in order to copy session attributes from one session to another.
        Parameters:
        oldSession - The previous session
        newSession - The new sessions builder
        forceAuth - Whether the authentication was forced
        Throws:
        com.iplanet.dpro.session.SessionException - If there was an error whilst retrieving the old session's properties.
      • updateProperty

        public void updateProperty​(com.iplanet.dpro.session.service.SessionBuilder session,
                                   String property,
                                   String value)
        This method updates a session property in the session with the given value. Override this method if you want to change some properties during the upgrade process. NOTE: If you override this, you SHOULD call super.updateProperty(..) at the end of your implementation with the updated values.
        Parameters:
        session - Session builder where the property should be set
        property - Name of the property to set
        value - Value of the given session property
      • shouldCopy

        public abstract boolean shouldCopy​(String key)
        This method decides whether a given session property should be copied to the new session.
        Parameters:
        key - The name of the session property which we want to decide to copy
        Returns:
        true if the property with the given key should be copied into the new session