Class Saml2AuthenticatedPrincipal

java.lang.Object
com.codename1.backend.security.saml2.Saml2AuthenticatedPrincipal

public final class Saml2AuthenticatedPrincipal extends Object
The user an identity provider vouched for in a SAML assertion: the assertion's NameID, the attributes it stated, and the session indexes it gave.
  • Constructor Details

    • Saml2AuthenticatedPrincipal

      public Saml2AuthenticatedPrincipal(String name, String nameIdFormat, Map<String, List<String>> attributes, List<String> sessionIndexes, String relyingPartyRegistrationId)
    • Saml2AuthenticatedPrincipal

      public Saml2AuthenticatedPrincipal(String name, String nameIdFormat, Map<String, List<String>> attributes, List<String> sessionIndexes, String relyingPartyRegistrationId, String nameQualifier, String spNameQualifier)
      With the NameID's NameQualifier and SPNameQualifier, which a logout request must repeat as the assertion gave them: ADFS refuses one that does not.
  • Method Details

    • getNameQualifier

      public String getNameQualifier()
      The NameID's NameQualifier, or null.
    • getSpNameQualifier

      public String getSpNameQualifier()
      The NameID's SPNameQualifier, or null.
    • getName

      public String getName()
      The NameID.
    • getNameIdFormat

      public String getNameIdFormat()
      The NameID's format, or null when the assertion did not say.
    • getAttributes

      public Map<String, List<String>> getAttributes()
      Every attribute, by its Name, with its values in order.
    • getAttribute

      public List<String> getAttribute(String name)
      The values of the attribute name; empty when there is none.
    • getFirstAttribute

      public String getFirstAttribute(String name)
      The first value of the attribute name, or null.
    • getSessionIndexes

      public List<String> getSessionIndexes()
    • getRelyingPartyRegistrationId

      public String getRelyingPartyRegistrationId()
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
      Overrides:
      toString in class Object