Class AssertionPayloadParser

  • All Implemented Interfaces:
    PayloadParser

    public class AssertionPayloadParser
    extends BasePayloadParser
    Assertion Payload Parser used to parse and generate Assertion Tickets such as:
  • Distributed Authorization Ticket
  • User Data Ticket
  • Approval Ticket

    Uses SAML Core 2.0 and SAMLP 2.0 as underlying message structures.

Parameters:
response - the attribute query response
Returns:
a parsed attirbute query response.
Throws:
MessageContentException - if response message data was invalid.
MessageProcessingException - if internal problems occurred generated the message.
  • getAssertionFromResponseType

    public javax.xml.bind.JAXBElement<AssertionType> getAssertionFromResponseType​(ResponseType responseType)
    Help method to extract a Assertion to be included in a CSMessasge from a response type
    Parameters:
    responseType - the response type to extract from, never null.
    Returns:
    the first assertion type of null if no assertion was found.
  • getTypeOfAssertion

    public AssertionTypeEnum getTypeOfAssertion​(javax.xml.bind.JAXBElement<AssertionType> assertion)
                                         throws MessageContentException
    Help method to get type of assertion from AssertionType saml attribute.
    Parameters:
    assertion - the assertion to lookup type for.
    Returns:
    the assertion type.
    Throws:
    MessageContentException - if no assertion type could be found.
  • parseAssertions

    public java.util.List<AssertionData> parseAssertions​(java.util.List<javax.xml.bind.JAXBElement<AssertionType>> assertions)
                                                  throws MessageContentException,
                                                         MessageProcessingException
    Method to parse (but not decrypt encrypted attributes) an assertion, usually used by clients of approval tickets, where the approvers data cannot be read since it's probably only intended for more sensitive systems. This method is intended to be used by clients and not server systems.
    Parameters:
    assertions - a list of assertions to parse, UserData and Authorization assertions are skipped and not included.
    Returns:
    parsed assertions, not all types of assertions i possible to parse without decryption such as authorization and user data tickets.
    Throws:
    MessageContentException - if content of message was invalid.
    MessageProcessingException - if internal problems occurred parsing the assertions.