Package com.azure.core.util
Class AuthenticateChallenge
java.lang.Object
com.azure.core.util.AuthenticateChallenge
An authenticate challenge.
This challenge can be from any source, but will primarily be from parsing HttpHeaderName.WWW_AUTHENTICATE or
HttpHeaderName.PROXY_AUTHENTICATE headers using CoreUtils.parseAuthenticateHeader(String).
Some challenge information may be optional, meaning the getters may return null or an empty collection.
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticateChallenge(String scheme) Creates an instance of the AuthenticateChallenge.AuthenticateChallenge(String scheme, String token68) Creates an instance of the AuthenticateChallenge.AuthenticateChallenge(String scheme, Map<String, String> parameters) Creates an instance of the AuthenticateChallenge. -
Method Summary
Modifier and TypeMethodDescriptionGets the parameters of the challenge as a read-only map.Gets the scheme of the challenge.Gets the token68 of the challenge.
-
Constructor Details
-
AuthenticateChallenge
Creates an instance of the AuthenticateChallenge.- Parameters:
scheme- The scheme of the challenge.- Throws:
IllegalArgumentException- If the scheme is null or empty.
-
AuthenticateChallenge
Creates an instance of the AuthenticateChallenge.- Parameters:
scheme- The scheme of the challenge.token68- The token68 of the challenge.- Throws:
IllegalArgumentException- If the scheme is null or empty.
-
AuthenticateChallenge
Creates an instance of the AuthenticateChallenge.- Parameters:
scheme- The scheme of the challenge.parameters- The parameters of the challenge.- Throws:
IllegalArgumentException- If the scheme is null or empty.
-
-
Method Details
-
getScheme
Gets the scheme of the challenge.- Returns:
- The scheme of the challenge.
-
getParameters
Gets the parameters of the challenge as a read-only map.This map will be empty if the challenge does not have any parameters.
- Returns:
- The parameters of the challenge.
-
getToken68
Gets the token68 of the challenge.This may be null if the challenge does not have a token68.
- Returns:
- The token68 of the challenge, or null if the challenge does not have a token68.
-