question: public static Map < String , String > createBasicAuthHeader ( String username , String password , Map < String , String > headerMap ) { if ( headerMap == null ) headerMap = new HashMap < > ( ) ; String credentials = username + ":" + password ; String base64EncodedCredentials = Base64 . encodeToString ( credentials . getBytes ( ) , Base64 . NO_WRAP ) ; headerMap . put ( "Authorization" , "Basic " + base64EncodedCredentials ) ; return headerMap ; }
target:  Method to create a basic HTTP base64 encrypted authentication header