Class AuthChallengeParser


  • @Deprecated
    public final class AuthChallengeParser
    extends java.lang.Object
    Deprecated.
    Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.
    This class provides utility methods for parsing HTTP www and proxy authentication challenges.
    Since:
    2.0beta1
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.util.Map extractParams​(java.lang.String challengeStr)
      Deprecated.
      Extracts a map of challenge parameters from an authentication challenge.
      static java.lang.String extractScheme​(java.lang.String challengeStr)
      Deprecated.
      Extracts authentication scheme from the given authentication challenge.
      static java.util.Map parseChallenges​(Header[] headers)
      Deprecated.
      Extracts a map of challenges ordered by authentication scheme name
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AuthChallengeParser

        public AuthChallengeParser()
        Deprecated.
    • Method Detail

      • extractScheme

        public static java.lang.String extractScheme​(java.lang.String challengeStr)
                                              throws MalformedChallengeException
        Deprecated.
        Extracts authentication scheme from the given authentication challenge.
        Parameters:
        challengeStr - the authentication challenge string
        Returns:
        authentication scheme
        Throws:
        MalformedChallengeException - when the authentication challenge string is malformed
        Since:
        2.0beta1
      • extractParams

        public static java.util.Map extractParams​(java.lang.String challengeStr)
                                           throws MalformedChallengeException
        Deprecated.
        Extracts a map of challenge parameters from an authentication challenge. Keys in the map are lower-cased
        Parameters:
        challengeStr - the authentication challenge string
        Returns:
        a map of authentication challenge parameters
        Throws:
        MalformedChallengeException - when the authentication challenge string is malformed
        Since:
        2.0beta1
      • parseChallenges

        public static java.util.Map parseChallenges​(Header[] headers)
                                             throws MalformedChallengeException
        Deprecated.
        Extracts a map of challenges ordered by authentication scheme name
        Parameters:
        headers - the array of authorization challenges
        Returns:
        a map of authorization challenges
        Throws:
        MalformedChallengeException - if any of challenge strings is malformed
        Since:
        3.0