java.lang.Object
org.miaixz.bus.http.secure.Challenge
An RFC 7235 compliant authentication challenge.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the auth params, includingrealmandcharsetif present, but as strings.charset()Returns the charset that should be used to encode the credentials.booleaninthashCode()realm()Returns the protection space.scheme()Returns the authentication scheme, likeBasic.toString()withCharset(Charset charset) Returns a copy of this challenge with thecharsetauth param set.
-
Constructor Details
-
Challenge
Constructs a new Challenge with a scheme and a map of parameters.- Parameters:
scheme- The authentication scheme.authParams- The map of authentication parameters.
-
Challenge
Constructs a new Challenge with a scheme and a realm.- Parameters:
scheme- The authentication scheme.realm- The authentication realm.
-
-
Method Details
-
withCharset
Returns a copy of this challenge with thecharsetauth param set.- Parameters:
charset- The character set to be used for encoding credentials.- Returns:
- A new
Challengeinstance with the specified charset.
-
scheme
Returns the authentication scheme, likeBasic.- Returns:
- The scheme string.
-
authParams
Returns the auth params, includingrealmandcharsetif present, but as strings. The map's keys are lowercase and should be treated case-insensitively.- Returns:
- An unmodifiable map of authentication parameters.
-
realm
Returns the protection space.- Returns:
- The realm string.
-
charset
Returns the charset that should be used to encode the credentials. Defaults to ISO-8859-1.- Returns:
- The character set.
-
equals
-
hashCode
public int hashCode() -
toString
-