Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class Saml2AuthenticatedPrincipal
- Object
- Saml2AuthenticatedPrincipal
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.
Constructors
Methods
public String getNameQualifier() | The NameID’s NameQualifier, or null. |
public String getSpNameQualifier() | The NameID’s SPNameQualifier, or null. |
public String getName() | The NameID. |
public String getNameIdFormat() | The NameID’s format, or null when the assertion did not say. |
public Map<String, List<String>> getAttributes() | Every attribute, by its Name, with its values in order. |
public List<String> getAttribute(String name) | The values of the attribute name; empty when there is none. |
public String getFirstAttribute(String name) | The first value of the attribute name, or null. |
public List<String> getSessionIndexes() | |
public String getRelyingPartyRegistrationId() | |
public String toString() | Returns a string representation of the object. |
Inherited methods
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()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())