code: public void setAuthentication(HttpURLConnection http) {
  		
  		if(user == null || pass == null 
  				|| user.length() <= 0 || pass.length() <= 0) {
  			return;
  		}
  
  		String base64login = Base64.encode(user + ":" + pass);
  
  		http.addRequestProperty("Authorization", "Basic " + base64login);
  		
  	}
docs: Set the authentication at the HttpURLConnection.
  
  @param http The HttpURLConnection to set authentication.