Interface Response


  • public interface Response
    This class represents the response that demands authentication.
    • Field Detail

      • TOKEN68_PATTERN_PART

        static final java.lang.String TOKEN68_PATTERN_PART
        See Also:
        Constant Field Values
      • QUOTED_PAIR_PATTERN_PART

        static final java.lang.String QUOTED_PAIR_PATTERN_PART
        See Also:
        Constant Field Values
      • QUOTED_STRING_PATTERN_PART

        static final java.lang.String QUOTED_STRING_PATTERN_PART
        See Also:
        Constant Field Values
      • AUTH_PARAM_PATTERN_PART

        static final java.lang.String AUTH_PARAM_PATTERN_PART
        See Also:
        Constant Field Values
      • CHALLENGE_PATTERN_PART

        static final java.lang.String CHALLENGE_PATTERN_PART
        See Also:
        Constant Field Values
      • AUTHENTICATION_HEADER_VALUE_SPLIT_PATTERN_PART

        static final java.lang.String AUTHENTICATION_HEADER_VALUE_SPLIT_PATTERN_PART
        See Also:
        Constant Field Values
      • AUTHENTICATION_HEADER_VALUE_PATTERN

        static final java.util.regex.Pattern AUTHENTICATION_HEADER_VALUE_PATTERN
      • AUTH_SCHEME_PATTERN

        static final java.util.regex.Pattern AUTH_SCHEME_PATTERN
      • AUTH_SCHEME_AND_TOKEN68_PATTERN

        static final java.util.regex.Pattern AUTH_SCHEME_AND_TOKEN68_PATTERN
      • AUTH_SCHEME_AND_PARAM_PATTERN

        static final java.util.regex.Pattern AUTH_SCHEME_AND_PARAM_PATTERN
      • AUTH_PARAM_PATTERN

        static final java.util.regex.Pattern AUTH_PARAM_PATTERN
      • TOKEN_PATTERN

        static final java.util.regex.Pattern TOKEN_PATTERN
      • QUOTED_PAIR_PATTERN

        static final java.util.regex.Pattern QUOTED_PAIR_PATTERN
      • AUTHENTICATION_HEADER_VALUE_SPLIT_PATTERN

        static final java.util.regex.Pattern AUTHENTICATION_HEADER_VALUE_SPLIT_PATTERN
      • WHITESPACE_SPLIT_PATTERN

        static final java.util.regex.Pattern WHITESPACE_SPLIT_PATTERN
      • AUTH_PARAM_SPLIT_PATTERN

        static final java.util.regex.Pattern AUTH_PARAM_SPLIT_PATTERN
      • QUOTED_STRING_AUTH_PARAM_AT_END_PATTERN

        static final java.util.regex.Pattern QUOTED_STRING_AUTH_PARAM_AT_END_PATTERN
      • CHALLENGES_CACHE

        static final java.util.Map<java.util.Map.Entry<java.lang.String,​java.lang.String>,​java.util.List<Challenge>> CHALLENGES_CACHE
    • Method Detail

      • getCode

        int getCode()
        The response code.
        Returns:
        The response code.
      • getMessage

        java.lang.String getMessage()
        The response message.
        Returns:
        The response message.
      • getHeaders

        java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getHeaders()
        The headers of the response.
        Returns:
        The headers of the response.
      • getHeaders

        default java.util.List<java.lang.String> getHeaders​(java.lang.String headerName)
        The headers of the response with the given name.
        Parameters:
        headerName - The name of the header for which to return the values.
        Returns:
        The headers of the response with the given name.
      • getBody

        default java.util.Optional<java.lang.String> getBody()
                                                      throws java.io.IOException
        The body of the response.
        Returns:
        The body of the response.
        Throws:
        java.io.IOException - If an IO error occurs.
      • getChallenges

        default java.util.stream.Stream<Challenge> getChallenges()
        Gets the RFC 7235 authentication challenges of this response.
        Returns:
        The authentication challenges of this response.
      • getChallenges

        default java.util.stream.Stream<Challenge> getChallenges​(java.lang.String authenticationScheme)
        Gets the RFC 7235 authentication challenges for the given scheme of this response.
        Parameters:
        authenticationScheme - The authentication scheme to get the challenges for.
        Returns:
        The authentication challenges of this response for the given scheme.