Class AuthChallengeProcessor
java.lang.Object
org.apache.commons.httpclient.auth.AuthChallengeProcessor
This class provides utility methods for processing HTTP www and proxy authentication
challenges.
- Since:
- 3.0
- Author:
- Oleg Kalnichevski
-
Constructor Summary
ConstructorsConstructorDescriptionAuthChallengeProcessor(HttpParams params) Creates an authentication challenge processor with the givenHTTP parameters -
Method Summary
Modifier and TypeMethodDescriptionprocessChallenge(AuthState state, Map challenges) Processes the given collection of challenges and updates thestateof the authentication process.selectAuthScheme(Map challenges) Determines the preferredauthentication schemethat can be used to respond to the given collection of challenges.
-
Constructor Details
-
AuthChallengeProcessor
Creates an authentication challenge processor with the givenHTTP parameters- Parameters:
params- theHTTP parametersused by this processor
-
-
Method Details
-
selectAuthScheme
Determines the preferredauthentication schemethat can be used to respond to the given collection of challenges.- Parameters:
challenges- the collection of authentication challenges- Returns:
- the preferred
authentication scheme - Throws:
AuthChallengeException- if the preferred authentication scheme cannot be determined or is not supported
-
processChallenge
public AuthScheme processChallenge(AuthState state, Map challenges) throws MalformedChallengeException, AuthenticationException Processes the given collection of challenges and updates thestateof the authentication process.- Parameters:
challenges- the collection of authentication challenges- Returns:
- the
authentication schemeused to process the challenge - Throws:
AuthChallengeException- if authentication challenges cannot be successfully processed or the preferred authentication scheme cannot be determinedMalformedChallengeExceptionAuthenticationException
-