Package com.sun.identity.saml2.common
Class NameIDInfo
- java.lang.Object
-
- com.sun.identity.saml2.common.NameIDInfo
-
public class NameIDInfo extends Object
This classNameIDInforepresents the user account federation information stored in the repository. The name of attribute name is sun-fm-saml2-nameid-info. This multiple-valued attribute is used to store all information related to the name identifier, such as IDP, SP entity id, role, etc. Value format for this attribute:| | | | | | | | where: : entity id for this hosted entity : entity id for the remote entity : name identifier for the IDP : nameid qualifier for the IDP : nameid format for the IDP : name identifier for the SP/Affiliation : nameid qualifier for the SP/Affiliation : value of SPRole, IDPRole or DualRole. : true for affiliation, false otherwise for example: http://www.sp.com|http://www.idp.com| vPQyHXLnSWLAVh2BoI3gdUrhanC1|http://www.idp.com| urn:oasis:names:tc:SAML:2.0:nameid-format:persistent| g6lD46kMqDGSsFPawoFrw4iNf86C|http://www.sp.com|SPRole|false
-
-
Constructor Summary
Constructors Constructor Description NameIDInfo(String hostEntityID, String remoteEntityID, NameID nameID, String hostEntityRole, boolean isAffiliation)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFormat()Returns the value of theNameIDformat.StringgetHostEntityID()Returns theEntityIDof the hosted provider.StringgetHostEntityRole()Returns the role of the host entity.NameIDgetNameID()Returns theNameIDobject.NameIDInfoKeygetNameIDInfoKey()Returns theNameIDInfoKeyStringgetNameIDValue()Returns theNameIDvalue.StringgetNameQualifier()Returns the value of theNameQualifier.StringgetRemoteEntityID()Returns theEntityIDof the remote provider.StringgetSPNameIDValue()Returns the Service Provider providedNameIDvalue.StringgetSPNameQualifier()Returns the Service Provider providedNameID's Name Qualifier.booleanisAffiliation()Checks if this is an affiliation based federation.static NameIDInfoparse(String info)Returns theNameIDInfoby parsing the string value.StringtoValueString()Returns the account federation information key value string that is stored in the repository.
-
-
-
Constructor Detail
-
NameIDInfo
public NameIDInfo(String hostEntityID, String remoteEntityID, NameID nameID, String hostEntityRole, boolean isAffiliation) throws SAML2Exception
Constructor- Parameters:
hostEntityID-EntityIDof the hosted entity.remoteEntityID-EntityIDof the remote entity.nameID-NameIDobject.hostEntityRole- the role of the hosted entity.isAffiliation- true if this account federation information is an affilation based federation.- Throws:
SAML2Exception- if any of the parameter values are null.
-
-
Method Detail
-
getNameID
public NameID getNameID()
Returns theNameIDobject.- Returns:
- the
NameIDobject.
-
getNameIDInfoKey
public NameIDInfoKey getNameIDInfoKey() throws SAML2Exception
Returns theNameIDInfoKey- Returns:
- the
NameIDobject. - Throws:
SAML2Exception- if any failure.
-
getNameIDValue
public String getNameIDValue()
Returns theNameIDvalue.- Returns:
- the value of the
NameID.
-
getNameQualifier
public String getNameQualifier()
Returns the value of theNameQualifier.- Returns:
- the value of the
NameQualifier.
-
getFormat
public String getFormat()
Returns the value of theNameIDformat.- Returns:
- the value of the
NameIDformat.
-
getSPNameIDValue
public String getSPNameIDValue()
Returns the Service Provider providedNameIDvalue.- Returns:
- the value of the Service Provider provided
NameID.
-
getSPNameQualifier
public String getSPNameQualifier()
Returns the Service Provider providedNameID's Name Qualifier.- Returns:
- the value of Service Provider provided
NameID's Name Qualifier.
-
getHostEntityID
public String getHostEntityID()
Returns theEntityIDof the hosted provider.- Returns:
- the
EntityIDof the hosted provider.
-
getRemoteEntityID
public String getRemoteEntityID()
Returns theEntityIDof the remote provider.- Returns:
- the
EntityIDof the remote provider.
-
getHostEntityRole
public String getHostEntityRole()
Returns the role of the host entity.- Returns:
- the role of the host entity.
-
isAffiliation
public boolean isAffiliation()
Checks if this is an affiliation based federation.- Returns:
- true if this is an affiliation based federation.
-
toValueString
public String toValueString()
Returns the account federation information key value string that is stored in the repository.- Returns:
- the value of the
NameIDInfothat is stored in the repository.
-
parse
public static NameIDInfo parse(String info) throws SAML2Exception
Returns theNameIDInfoby parsing the string value.- Returns:
- the
NameIDInfo - Throws:
SAML2Exception- if the parsing fails.
-
-