public String getHeader ( ) { String authPair = username + ' ' + apiKey ; return "Basic " + Base64 . getEncoder ( ) . encodeToString ( authPair . getBytes ( ) ) ; }
Gets the encoded representation of the basic authentication credentials for use in an HTTP Authorization header .