Class Base64Utils
java.lang.Object
org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.Base64Utils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
generateAuthorizationHeaderValue
(String authType, String user, String password, BuildContext context, boolean applyMacro) Creates the value for anAuthorization
header consisting of:
"authType base64Encoded(user:password)"
e.g.
-
Field Details
-
AUTHTYPE_BASIC
- See Also:
-
-
Constructor Details
-
Base64Utils
public Base64Utils()
-
-
Method Details
-
encode
- Throws:
UnsupportedEncodingException
-
generateAuthorizationHeaderValue
@NonNull public static String generateAuthorizationHeaderValue(String authType, String user, String password, BuildContext context, boolean applyMacro) throws IOException Creates the value for anAuthorization
header consisting of:
"authType base64Encoded(user:password)"
e.g. "Basic zhwef9tz33ergwerg4394zh370345zh=="- Parameters:
authType
- the authorization type.user
- the user name.password
- the user password.context
- the context of this Builder/BuildStep.applyMacro
- boolean to control if macro replacements occur- Returns:
- the base64 encoded authorization.
- Throws:
IOException
- if there is a failure while replacing token macros, or if there is a failure while encoding user:password.
-