@@ -0,0 +1,1615 @@
+package org.gbif.ws.client;%0A%0Aimport feign.RequestInterceptor;%0Aimport feign.RequestTemplate;%0A%0Aimport java.nio.charset.Charset;%0Aimport java.nio.charset.StandardCharsets;%0Aimport java.util.Base64;%0A%0A/**%0A * Request Interceptor adding HTTP Basic Authentication header to the HTTP request.%0A * Analogue of Jersey's HTTPBasicAuthFilter.%0A */%0Apublic class SimpleUserAuthRequestInterceptor implements RequestInterceptor %7B%0A%0A  private final String authentication;%0A  static private final Charset CHARACTER_SET = StandardCharsets.ISO_8859_1;%0A%0A  /**%0A   * Creates a new request interceptor using provided username%0A   * and password credentials. This constructor allows you to avoid storing%0A   * plain password value in a String variable.%0A   */%0A  public SimpleUserAuthRequestInterceptor(final String username, final byte%5B%5D password) %7B%0A    final byte%5B%5D prefix = (username + %22:%22).getBytes(CHARACTER_SET);%0A    final byte%5B%5D usernamePassword = new byte%5Bprefix.length + password.length%5D;%0A%0A    System.arraycopy(prefix, 0, usernamePassword, 0, prefix.length);%0A    System.arraycopy(password, 0, usernamePassword, prefix.length, password.length);%0A%0A    authentication = %22Basic %22 + new String(Base64.getEncoder().encode(usernamePassword), StandardCharsets.US_ASCII);%0A  %7D%0A%0A  /**%0A   * Creates a new request interceptor using provided username%0A   * and password credentials.%0A   */%0A  public SimpleUserAuthRequestInterceptor(final String username, final String password) %7B%0A    this(username, password.getBytes(CHARACTER_SET));%0A  %7D%0A%0A  @Override%0A  public void apply(RequestTemplate template) %7B%0A    template.header(%22Authorization%22, authentication);%0A  %7D%0A%7D%0A

Add client SimpleUserAuthRequestInterceptor