Class HttpMacrosUpdater
java.lang.Object
org.sentrysoftware.metricshub.engine.client.http.HttpMacrosUpdater
Utility class for updating HTTP macros in a text string.
Replaces known HTTP macros with literal target sequences, such as username,
password, authentication-token, base64-password, base64-auth, and sha256-auth.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringupdate(String text, String username, char[] password, String authenticationToken, @NonNull String hostname) Replaces each known HTTP macro in the given text with the literal target sequences:
username, password, authentication-token, base64-password, base64-auth and sha256-auth
-
Constructor Details
-
HttpMacrosUpdater
public HttpMacrosUpdater()
-
-
Method Details
-
update
public static String update(String text, String username, char[] password, String authenticationToken, @NonNull @NonNull String hostname) Replaces each known HTTP macro in the given text with the literal target sequences:
username, password, authentication-token, base64-password, base64-auth and sha256-auth- Parameters:
text- The text we wish to updateusername- The HTTP usernamepassword- The HTTP passwordauthenticationToken- The HTTP Authentication Tokenhostname- The remote hostname- Returns:
- String value
-