public class Base64Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AUTHTYPE_BASIC |
Constructor and Description |
---|
Base64Utils() |
Modifier and Type | Method and Description |
---|---|
static String |
encode(String input) |
static String |
generateAuthorizationHeaderValue(String authType,
String user,
String password,
BuildContext context,
boolean applyMacro)
Creates the value for an
Authorization header consisting of: "authType base64Encoded(user:password)" e.g. |
public static final String AUTHTYPE_BASIC
public static String encode(String input) throws UnsupportedEncodingException
UnsupportedEncodingException
@Nonnull public static String generateAuthorizationHeaderValue(String authType, String user, String password, BuildContext context, boolean applyMacro) throws IOException
Authorization
header consisting of: 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 occurIOException
- if there is a failure while replacing token macros, or
if there is a failure while encoding user:password.Copyright © 2016–2023. All rights reserved.