Class AuthenticationChallenge
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.proxy.AuthenticationChallenge
A simple representation of an authentication challenge as sent in a
"WWW-Authenticate" or "Proxy-Authenticate" header. Such challenges start with
a mechanism name, followed either by one single token, or by a list of
key=value pairs.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationChallenge
(String mechanism) Create a newAuthenticationChallenge
with the given mechanism. -
Method Summary
Modifier and TypeMethodDescription(package private) void
addArgument
(String key, String value) Retrieves the arguments of the challenge.Retrieves the authentication mechanism specified by this challenge, for instance "Basic".getToken()
Retrieves the token of the challenge, if any.(package private) void
toString()
-
Field Details
-
mechanism
-
token
-
arguments
-
-
Constructor Details
-
AuthenticationChallenge
Create a newAuthenticationChallenge
with the given mechanism.- Parameters:
mechanism
- for the challenge
-
-
Method Details
-
getMechanism
Retrieves the authentication mechanism specified by this challenge, for instance "Basic".- Returns:
- the mechanism name
-
getToken
Retrieves the token of the challenge, if any.- Returns:
- the token, or
null
if there is none.
-
getArguments
Retrieves the arguments of the challenge.- Returns:
- a possibly empty map of the key=value arguments of the challenge
-
addArgument
-
setToken
-
toString
-