Class ContextHolder


  • public class ContextHolder
    extends Object
    Holds server side info for an authentication conversation in progress for a user via a radius client.
    • Constructor Detail

      • ContextHolder

        public ContextHolder​(String key)
        Constructs a ContextHolder with its unique key.
        Parameters:
        key - the unique cache key for the context holder
    • Method Detail

      • getCallbackSetProps

        public PagePropertiesCallback getCallbackSetProps()
        get the callback set properties.
        Returns:
        the callback properties for the current module.
      • setCallbackSetProps

        public void setCallbackSetProps​(PagePropertiesCallback callbackSetProps)
        Sets the callback properties for the module currently being processed.
        Parameters:
        callbackSetProps - - a PagePropertiesCallback reference.
      • getModuleName

        public String getModuleName()
        Gets the name of the module.
        Returns:
        the name of the module currently being processed, or null if no module is being processed.
      • setModuleName

        public void setModuleName​(String moduleName)
        Sets the name of the module currently being processed.
        Parameters:
        moduleName - - a non null string containing the name of the module.
      • incrementChainModuleIndex

        public void incrementChainModuleIndex()
        Increments the chain module index to indicate that the next module in the chain is currently being processed.
      • getChainModuleIndex

        public int getChainModuleIndex()
        Get the chain module index.
        Returns:
        The zero based index of the current module in the chain for whom we are gathering values from the user. -1 indicates that there is no module set. This is so that we can centralize updating this info set without regard to whether we are handling the first set or following sets.
      • getCallbacks

        public Callback[] getCallbacks()
        Gets the array of callback objects for the chain.
        Returns:
        an array of Callback objects.
      • setCallbacks

        public void setCallbacks​(Callback[] callbacks)
        Sets the array of Callback objects for the chain.
        Parameters:
        callbacks - an array of Callback objects.
      • getIdxOfCurrentCallback

        public int getIdxOfCurrentCallback()
        Get the index of the current callback.
        Returns:
        the index of the current callback.
      • setIdxOfCurrentCallback

        public void setIdxOfCurrentCallback​(int idxOfCurrentCallback)
        set the current callback index.
        Parameters:
        idxOfCurrentCallback - The index of the current callback.
      • incrementIdxOfCurrentCallback

        public void incrementIdxOfCurrentCallback()
        Increment the current callback index.
      • getIdxOfCallbackSetInModule

        public int getIdxOfCallbackSetInModule()
        gets the index of the callback set in the module.
        Returns:
        the index of the callback set in the module.
      • setIdxOfCallbackSetInModule

        public void setIdxOfCallbackSetInModule​(int idxOfCallbackSetInModule)
        Set the index of the callback set in the module.
        Parameters:
        idxOfCallbackSetInModule - the index of the callback set in the module.
      • incrementIdxOfCallbackSetInModule

        public void incrementIdxOfCallbackSetInModule()
        Increments the index of the callback set in the module.
      • getAuthContext

        public AuthContext getAuthContext()
        get the auth context.
        Returns:
        a AuthContext object.
      • setAuthContext

        public void setAuthContext​(AuthContext authContext)
        set the auth context.
        Parameters:
        authContext - a AuthContext object
      • getMillisExpiryForCurrentCallbacks

        public Long getMillisExpiryForCurrentCallbacks()
        get the number of milliseconds before the current callback expires.
        Returns:
        a Long representing the number of milliseconds until the current callback expires.
      • setMillisExpiryForCurrentCallbacks

        public void setMillisExpiryForCurrentCallbacks​(Long millisExpiryForCurrentCallbacks)
        Sets the period in milliseconds until the current callback expire.
        Parameters:
        millisExpiryForCurrentCallbacks - a Long representing the number of milliseconds until the current callback expires.
      • getMillisExpiryPoint

        public Long getMillisExpiryPoint()
        gets the point at which the current context holder expires.
        Returns:
        the difference, measured in milliseconds, between the context holder's expiry time and midnight, January 1, 1970
      • setMillisExpiryPoint

        public void setMillisExpiryPoint​(Long millisExpiryPoint)
        Sets the point at which the current context holder expires.
        Parameters:
        millisExpiryPoint - the difference, measured in milliseconds, between the context holder's expiry time and midnight, January 1, 1970
      • getCacheKey

        public String getCacheKey()
        get the cache key of this context holder.
        Returns:
        a String object containing the key for the context holder.
      • getAuthPhase

        public ContextHolder.AuthPhase getAuthPhase()
        get the auth phase of the context holder.
        Returns:
        an AuthPhase object.
      • setAuthPhase

        public void setAuthPhase​(ContextHolder.AuthPhase authPhase)
        Set the auth phase of the context holder.
        Parameters:
        authPhase - an AuthPhase object.
      • getUniversalId

        public String getUniversalId()
        Obtain the universal ID from the SSO token held by the auth context. If there is no SSO token available or there is no universal id available then null will be returned.
        Returns:
        the universalId, or null if none is available.