Class BaseIdPInitiatedSSORequestMessageDecoder

    • Field Detail

      • PROVIDER_ID_PARAM

        @Nonnull
        @NotEmpty
        public static final String PROVIDER_ID_PARAM
        Name of the query parameter carrying the service provider entity ID: "providerId" .
        See Also:
        Constant Field Values
      • SHIRE_PARAM

        @Nonnull
        @NotEmpty
        public static final String SHIRE_PARAM
        Name of the query parameter carrying the service provider's assertion consumer service URL: "shire" .
        See Also:
        Constant Field Values
      • TARGET_PARAM

        @Nonnull
        @NotEmpty
        public static final String TARGET_PARAM
        Name of the query parameter carrying the service provider's target/RelayState information: "target" .
        See Also:
        Constant Field Values
      • TIME_PARAM

        @Nonnull
        @NotEmpty
        public static final String TIME_PARAM
        Name of the query parameter carrying the current time at the service provider: "time" .
        See Also:
        Constant Field Values
      • log

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

        @Nonnull
        private final org.slf4j.Logger protocolMessageLog
        Used to log protocol messages.
    • Constructor Detail

      • BaseIdPInitiatedSSORequestMessageDecoder

        public BaseIdPInitiatedSSORequestMessageDecoder()
    • Method Detail

      • getEntityId

        @Nonnull
        @NotEmpty
        protected String getEntityId​(@Nonnull
                                     javax.servlet.http.HttpServletRequest request)
                              throws MessageDecodingException
        Gets the entity ID of the service provider.
        Parameters:
        request - current HTTP request
        Returns:
        the entity ID of the service provider
        Throws:
        MessageDecodingException - thrown if the request does not contain a service provider entity ID
      • getAcsUrl

        @Nullable
        protected String getAcsUrl​(@Nonnull
                                   javax.servlet.http.HttpServletRequest request)
        Gets the assertion consumer service URL for the service provider.
        Parameters:
        request - current HTTP request
        Returns:
        the assertion consumer service URL, may be null if none is given in the request
      • getTarget

        @Nullable
        protected String getTarget​(@Nonnull
                                   javax.servlet.http.HttpServletRequest request)
        Gets the opaque relay state sent by the service provider.
        Parameters:
        request - current HTTP request
        Returns:
        the relay state, or null if the service provider did not send one
      • getTime

        @Nullable
        protected Instant getTime​(@Nonnull
                                  javax.servlet.http.HttpServletRequest request)
                           throws MessageDecodingException
        Gets the current time at the SP, if set.
        Parameters:
        request - current HTTP request
        Returns:
        the time sent by the service provider, or null
        Throws:
        MessageDecodingException - thrown if the time parameter given by the service provider is non-numeric or a negative time
      • logDecodedMessage

        protected void logDecodedMessage()
        Log the decoded message to the protocol message logger.
      • getMessageID

        @Nonnull
        protected String getMessageID()
        Construct a message ID for the request.
        Returns:
        the message ID to use
      • getMessageToLog

        @Nullable
        protected abstract String getMessageToLog()
        Get the string representation of what will be logged as the protocol message.
        Returns:
        the string representing the protocol message for logging purposes