Class MetadataQueryRequestDecoder

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, UnmodifiableComponent, MessageDecoder, HttpServletRequestMessageDecoder

public class MetadataQueryRequestDecoder extends AbstractHttpServletRequestMessageDecoder
Decodes an incoming metadata query request.
  • Field Details

    • ENTITY_ID_PARAM

      @Nonnull @NotEmpty public static final String ENTITY_ID_PARAM
      Name of the query parameter carrying the entityID: "entityID" .
      See Also:
    • PROTOCOL_PARAM

      @Nonnull @NotEmpty public static final String PROTOCOL_PARAM
      Name of the query parameter carrying the protocol: "protocol" .
      See Also:
    • SAML1_PARAM

      @Nonnull @NotEmpty public static final String SAML1_PARAM
      Name of the query parameter for the SAML 1 protocol: "saml1" .
      See Also:
    • SAML2_PARAM

      @Nonnull @NotEmpty public static final String SAML2_PARAM
      Name of the query parameter for the SAML 2 protocol: "saml2" .
      See Also:
    • CAS_PARAM

      @Nonnull @NotEmpty public static final String CAS_PARAM
      Name of the query parameter for the CAS protocol: "cas" .
      See Also:
    • DETECT_DUPLICATES_PARAM

      @Nonnull @NotEmpty public static final String DETECT_DUPLICATES_PARAM
      Name of the query parameter carrying the detectDuplicateEntityIDs: "detectDuplicateEntityIDs" .
      See Also:
    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
  • Constructor Details

    • MetadataQueryRequestDecoder

      public MetadataQueryRequestDecoder()
  • Method Details

    • doDecode

      protected void doDecode() throws MessageDecodingException
      Specified by:
      doDecode in class AbstractMessageDecoder
      Throws:
      MessageDecodingException
    • getEntityID

      @Nonnull @NotEmpty protected String getEntityID(@Nonnull javax.servlet.http.HttpServletRequest request) throws MessageDecodingException
      Get the entityID parameter.
      Parameters:
      request - current HTTP request
      Returns:
      the entityID
      Throws:
      MessageDecodingException - thrown if the request does not contain an entityID
    • getProtocol

      @Nullable protected String getProtocol(@Nonnull javax.servlet.http.HttpServletRequest request)
      Get the protocol.
      Parameters:
      request - current HTTP request
      Returns:
      the protocol, or null
    • getDetectDuplicateEntityIDs

      @Nullable protected DetectDuplicateEntityIDs getDetectDuplicateEntityIDs(@Nonnull javax.servlet.http.HttpServletRequest request) throws MessageDecodingException
      Get the strategy for duplicate entityID detection.
      Parameters:
      request - current HTTP request
      Returns:
      the strategy, or null
      Throws:
      MessageDecodingException - if the request request contains an invalid value for detectDuplicateEntityIDs