Update basicAuthentication method so that it matches protocol standards
* Update test for basicAuthentication
* Change delimiter in basicAuthentication
Change delimiter from hyphen to colon to match basic authentication standards.
@@ -153,7 +153,7 @@ public class HttpRequestImpl<T> implements HttpRequest<T> {
@Override
public HttpRequest<T> basicAuthentication(Buffer id, Buffer password) {
- Buffer buff = Buffer.buffer().appendBuffer(id).appendString("-").appendBuffer(password);
+ Buffer buff = Buffer.buffer().appendBuffer(id).appendString(":").appendBuffer(password);
String credentials = new String(Base64.getEncoder().encode(buff.getBytes()));
return putHeader(HttpHeaders.AUTHORIZATION.toString(), "Basic " + credentials);
}
