Class NameIDInfo


  • public class NameIDInfo
    extends Object
    This class NameIDInfo represents 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:
      <hosted_entity_id>|<remote_entity_id>|<idp_nameid>|<idp_nameid_qualifier>|
      <idp_nameid_format>|<sp_nameid>|<sp_nameid_qualifier>|<hosted_entity_role>|
     <is_affiliation>
           where:
           <hosted_entity_id>    : entity id for this hosted entity
           <remote_entity_id>    : entity id for the remote entity
           <idp_nameid>          : name identifier for the IDP
           <idp_nameid_qualifier>: nameid qualifier for the IDP
           <idp_nameid_format>   : nameid format for the IDP
           <sp_nameid>           : name identifier for the SP/Affiliation
           <sp_nameid_qualifier> : nameid qualifier for the SP/Affiliation
           <hosted_entity_role>  : value of SPRole, IDPRole or DualRole.
           <is_affiliation>      : 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 Detail

      • NameIDInfo

        public NameIDInfo​(String hostEntityID,
                          String remoteEntityID,
                          NameID nameID,
                          String hostEntityRole,
                          boolean isAffiliation)
                   throws SAML2Exception
        Constructor
        Parameters:
        hostEntityID - EntityID of the hosted entity.
        remoteEntityID - EntityID of the remote entity.
        nameID - NameID object.
        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 the NameID object.
        Returns:
        the NameID object.
      • getNameIDValue

        public String getNameIDValue()
        Returns the NameID value.
        Returns:
        the value of the NameID.
      • getNameQualifier

        public String getNameQualifier()
        Returns the value of the NameQualifier.
        Returns:
        the value of the NameQualifier.
      • getFormat

        public String getFormat()
        Returns the value of the NameID format.
        Returns:
        the value of the NameID format.
      • getSPNameIDValue

        public String getSPNameIDValue()
        Returns the Service Provider provided NameID value.
        Returns:
        the value of the Service Provider provided NameID.
      • getSPNameQualifier

        public String getSPNameQualifier()
        Returns the Service Provider provided NameID's Name Qualifier.
        Returns:
        the value of Service Provider provided NameID's Name Qualifier.
      • getHostEntityID

        public String getHostEntityID()
        Returns the EntityID of the hosted provider.
        Returns:
        the EntityID of the hosted provider.
      • getRemoteEntityID

        public String getRemoteEntityID()
        Returns the EntityID of the remote provider.
        Returns:
        the EntityID of 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 NameIDInfo that is stored in the repository.