org.apache.commons.httpclient.auth
Class AuthChallengeParser
public final class AuthChallengeParser
This class provides utility methods for parsing HTTP www and proxy authentication
challenges.
- Oleg Kalnichevski
- 2.0beta1
static Map | extractParams(String challengeStr) - Extracts a map of challenge parameters from an authentication challenge.
|
static String | extractScheme(String challengeStr) - Extracts authentication scheme from the given authentication
challenge.
|
static Map | parseChallenges(Header[] headers) - Extracts a map of challenges ordered by authentication scheme name
|
extractParams
public static Map extractParams(String challengeStr)
throws MalformedChallengeException
Extracts a map of challenge parameters from an authentication challenge.
Keys in the map are lower-cased
challengeStr
- the authentication challenge string
- a map of authentication challenge parameters
MalformedChallengeException
- when the authentication challenge string
is malformed
- 2.0beta1
extractScheme
public static String extractScheme(String challengeStr)
throws MalformedChallengeException
Extracts authentication scheme from the given authentication
challenge.
challengeStr
- the authentication challenge string
- authentication scheme
MalformedChallengeException
- when the authentication challenge string
is malformed
- 2.0beta1
parseChallenges
public static Map parseChallenges(Header[] headers)
throws MalformedChallengeException
Extracts a map of challenges ordered by authentication scheme name
headers
- the array of authorization challenges
- a map of authorization challenges
MalformedChallengeException
- if any of challenge strings
is malformed
- 3.0
Copyright (c) 1999-2005 - Apache Software Foundation