public static CallCredentials basicAuth ( final String username , final String password ) { final Metadata extraHeaders = new Metadata ( ) ; extraHeaders . put ( AUTHORIZATION_HEADER , encodeBasicAuth ( username , password ) ) ; return new StaticSecurityHeaderCallCredentials ( extraHeaders ) ; }
Creates a new call credential with the given username and password for basic auth .