Class FSSession


  • public class FSSession
    extends Object
    Class that encasulates federation session.
    • Constructor Detail

      • FSSession

        public FSSession​(String sessionID,
                         List sessionPartners)
        Constructs a new FSSession.
        Parameters:
        sessionID - authentication session ID
        sessionPartners - list of session partners
      • FSSession

        public FSSession​(String sessionID)
        Constructs a new FSSession object.
        Parameters:
        sessionID - authentication session ID
    • Method Detail

      • getAuthnContext

        public String getAuthnContext()
        Returns authentication context.
        Returns:
        authentication context
        See Also:
        setAuthnContext(String)
      • setAuthnContext

        public void setAuthnContext​(String authnContext)
        Sets authentication context.
        Parameters:
        authnContext - authentication context to be set
        See Also:
        getAuthnContext()
      • setSessionIndex

        public void setSessionIndex​(String sessionIndex)
        Sets session index.
        Parameters:
        sessionIndex - session index to be set
        See Also:
        getSessionIndex()
      • getSessionPartners

        public List getSessionPartners()
        Returns list of session partners.
        Returns:
        list of session partners
      • addSessionPartner

        public void addSessionPartner​(FSSessionPartner sessionPartner)
        Adds a session partner.
        Parameters:
        sessionPartner - session partner to be added
      • getCurrentSessionPartner

        public FSSessionPartner getCurrentSessionPartner()
        Returns the first session partner of the list of session partners.
        Returns:
        the first session partner of the list
      • removeSessionPartner

        public void removeSessionPartner​(String sessionPartner)
        Removes a session partner.
        Parameters:
        sessionPartner - session partner to be removed
      • getSessionID

        public String getSessionID()
        Returns session ID.
        Returns:
        authentication session ID
      • addAttribute

        public void addAttribute​(String key,
                                 String value)
        Adds attribute to the session.
        Parameters:
        key - name of the attribute
        value - value of the attribute
      • getAttribute

        public String getAttribute​(String key)
        Returns value of an attribute from the session.
        Parameters:
        key - name of the attribute
        Returns:
        value of the attribute
      • hashCode

        public int hashCode()
        Returns a hash code for this session. The value is the hash code of the session ID.
        Overrides:
        hashCode in class Object
        Returns:
        a hash code value for this object
      • setBootStrapAttributeStatement

        public void setBootStrapAttributeStatement​(AttributeStatement statement)
        Sets the boot strap attribute statement.
        Parameters:
        statement - Boot strap attribute statement
        See Also:
        getBootStrapAttributeStatement()
      • getBootStrapResourceOfferings

        public NodeList getBootStrapResourceOfferings()
        Gets Discovery Service Boot strap resource offerings.
        Returns:
        Bootstrap resoource offerings
      • setBootStrapCredential

        public void setBootStrapCredential​(List assertions)
        Sets the bootstrap security credential assertion.
        Parameters:
        assertions - List of bootstrap security assertions.
        See Also:
        getBootStrapCredential()
      • getBootStrapCredential

        public List getBootStrapCredential()
        Gets the boot strap security credential assertion.
        Returns:
        List of Boot strap security assertion
        See Also:
        setBootStrapCredential(List)
      • setAutoFedStatement

        public void setAutoFedStatement​(AttributeStatement autoFedStmt)
        Sets AutoFederate Statement.
        Parameters:
        autoFedStmt - Auto Federate Statement.
        See Also:
        getAutoFedStatement()
      • setAttributeStatements

        public void setAttributeStatements​(List attrStatements)
        Sets Attribute Statements.
        Parameters:
        attrStatements - List of Attribute Statements.
        See Also:
        getAttributeStatements()
      • getAttributeStatements

        public List getAttributeStatements()
        Gets Attribute Statements.
        Returns:
        List of Attribute Statements.
        See Also:
        setAttributeStatements(List)
      • setOneTime

        public void setOneTime​(boolean oneTimeFlag)
        Sets the flag for one time federation.
        Parameters:
        oneTimeFlag - flag for one time federation
        See Also:
        getOneTime()
      • getOneTime

        public boolean getOneTime()
        Returns the flag for one time federation.
        Returns:
        true if the session is for one time federation; false otherwise.
      • setAccountFedInfo

        public void setAccountFedInfo​(FSAccountFedInfo fedInfo)
        Sets account federation info.
        Parameters:
        fedInfo - account federation info to be set
        See Also:
        getAccountFedInfo()
      • setUserID

        public void setUserID​(String userID)
        Sets user ID.
        Parameters:
        userID - user ID to be set
        See Also:
        getUserID()