Class SAMLMessageInfoContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
org.opensaml.saml.common.messaging.context.SAMLMessageInfoContext
All Implemented Interfaces:
Iterable<BaseContext>

public final class SAMLMessageInfoContext extends BaseContext
A context intended to be used as a subcontext of a MessageContext that carries some basic information about the SAML message.

The methods getMessageId() and getMessageIssueInstant() will attempt to dynamically resolve the appropriate data from the SAML message held in the message context if the data has not been set statically by the corresponding setter method. This evaluation will be attempted only if the this context instance is an immediate child of the message context, as returned by BaseContext.getParent().

  • Field Details

    • messageId

      @Nullable @NotEmpty private String messageId
      The ID of the message.
    • issueInstant

      @Nullable private Instant issueInstant
      The issue instant of the message.
  • Constructor Details

    • SAMLMessageInfoContext

      public SAMLMessageInfoContext()
  • Method Details

    • getMessageId

      @Nullable @NotEmpty public String getMessageId()
      Gets the ID of the message.
      Returns:
      ID of the message, may be null
    • setMessageId

      public void setMessageId(@Nullable String newMessageId)
      Sets the ID of the message.
      Parameters:
      newMessageId - ID of the message
    • getMessageIssueInstant

      @Nullable public Instant getMessageIssueInstant()
      Gets the issue instant of the message.
      Returns:
      issue instant of the message
    • setMessageIssueInstant

      public void setMessageIssueInstant(@Nullable Instant messageIssueInstant)
      Sets the issue instant of the message.
      Parameters:
      messageIssueInstant - issue instant of the message
    • resolveMessageId

      @Nullable protected String resolveMessageId()
      Dynamically resolve the message ID from the SAML protocol message held in MessageContext.getMessage().
      Returns:
      the message ID, or null if it can not be resolved
    • resolveIssueInstant

      @Nullable protected Instant resolveIssueInstant()
      Dynamically resolve the message issue instant from the SAML protocol message held in MessageContext.getMessage().
      Returns:
      the message issue instant, or null if it can not be resolved
    • resolveSAMLMessage

      @Nullable protected SAMLObject resolveSAMLMessage()
      Resolve the SAML message from the message context.
      Returns:
      the SAML message, or null if it can not be resolved