
io.probedock.api.test.headers.AuthenticationBasicApiHeader Maven / Gradle / Ivy
package io.probedock.api.test.headers;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.HttpHeaders;
/**
* Authorization header for Basic Authentication.
*
* @author Laurent Prevost
*/
public class AuthenticationBasicApiHeader extends ApiHeader {
/**
* Constructs a new header.
*
* @param user the username
* @param password the password
*/
public AuthenticationBasicApiHeader(String user, String password) {
super(HttpHeaders.AUTHORIZATION, "Basic " + Base64.encodeBase64String((user + ":" + password).getBytes()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy