java.lang.Object
org.miaixz.bus.http.secure.Credentials
A factory for creating HTTP authorization credentials.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Details
-
basic
Returns a credential string for Basic HTTP authentication using the ISO-8859-1 charset.- Parameters:
username- The username.password- The password.- Returns:
- The formatted credential string (e.g., "Basic dXNlcjpwYXNz").
-
basic
Returns a credential string for Basic HTTP authentication using the specified charset.- Parameters:
username- The username.password- The password.charset- The character set to use for encoding the credentials.- Returns:
- The formatted credential string (e.g., "Basic dXNlcjpwYXNz").
-