Class FSSession
- java.lang.Object
-
- com.sun.identity.federation.services.FSSession
-
public class FSSession extends Object
Class that encasulates federation session.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String key, String value)Adds attribute to the session.voidaddSessionPartner(FSSessionPartner sessionPartner)Adds a session partner.FSAccountFedInfogetAccountFedInfo()Returns account federation info.StringgetAttribute(String key)Returns value of an attribute from the session.ListgetAttributeStatements()Gets Attribute Statements.StringgetAuthnContext()Returns authentication context.AttributeStatementgetAutoFedStatement()Gets Auto Federate Statement.AttributeStatementgetBootStrapAttributeStatement()Gets the boot strap attribute statement.ListgetBootStrapCredential()Gets the boot strap security credential assertion.NodeListgetBootStrapResourceOfferings()Gets Discovery Service Boot strap resource offerings.FSSessionPartnergetCurrentSessionPartner()Returns the first session partner of the list of session partners.booleangetOneTime()Returns the flag for one time federation.StringgetSessionID()Returns session ID.StringgetSessionIndex()Returns session index.ListgetSessionPartners()Returns list of session partners.StringgetUserID()Returns user ID.inthashCode()Returns a hash code for this session.voidremoveSessionPartner(String sessionPartner)Removes a session partner.voidsetAccountFedInfo(FSAccountFedInfo fedInfo)Sets account federation info.voidsetAttributeStatements(List attrStatements)Sets Attribute Statements.voidsetAuthnContext(String authnContext)Sets authentication context.voidsetAutoFedStatement(AttributeStatement autoFedStmt)Sets AutoFederate Statement.voidsetBootStrapAttributeStatement(AttributeStatement statement)Sets the boot strap attribute statement.voidsetBootStrapCredential(List assertions)Sets the bootstrap security credential assertion.voidsetOneTime(boolean oneTimeFlag)Sets the flag for one time federation.voidsetSessionIndex(String sessionIndex)Sets session index.voidsetUserID(String userID)Sets user ID.
-
-
-
Constructor Detail
-
FSSession
public FSSession(String sessionID, List sessionPartners)
Constructs a newFSSession.- Parameters:
sessionID- authentication session IDsessionPartners- list of session partners
-
FSSession
public FSSession(String sessionID)
Constructs a newFSSessionobject.- 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()
-
getSessionIndex
public String getSessionIndex()
Returns session index.- Returns:
- session index.
- See Also:
setSessionIndex(String)
-
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 attributevalue- 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.
-
setBootStrapAttributeStatement
public void setBootStrapAttributeStatement(AttributeStatement statement)
Sets the boot strap attribute statement.- Parameters:
statement- Boot strap attribute statement- See Also:
getBootStrapAttributeStatement()
-
getBootStrapAttributeStatement
public AttributeStatement getBootStrapAttributeStatement()
Gets the boot strap attribute statement.- Returns:
- Boot strap attribute statement
- See Also:
setBootStrapAttributeStatement(AttributeStatement)
-
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()
-
getAutoFedStatement
public AttributeStatement getAutoFedStatement()
Gets Auto Federate Statement.- Returns:
- Auto Federate Statement.
- See Also:
setAutoFedStatement(AttributeStatement)
-
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:
trueif the session is for one time federation;falseotherwise.
-
setAccountFedInfo
public void setAccountFedInfo(FSAccountFedInfo fedInfo)
Sets account federation info.- Parameters:
fedInfo- account federation info to be set- See Also:
getAccountFedInfo()
-
getAccountFedInfo
public FSAccountFedInfo getAccountFedInfo()
Returns account federation info.- Returns:
FSAccountFedInfoobject- See Also:
setAccountFedInfo(FSAccountFedInfo)
-
setUserID
public void setUserID(String userID)
Sets user ID.- Parameters:
userID- user ID to be set- See Also:
getUserID()
-
getUserID
public String getUserID()
Returns user ID.- Returns:
- user ID
- See Also:
setUserID(String)
-
-