public static String getBasicAuth ( String user , final String pass ) { return "Basic " + java . util . Base64 . getEncoder ( ) . encodeToString ( ( user + ":" + pass ) . getBytes ( ) ) ; }
Generates a BASE64 Basic Authentication String