code: private void addBasicAuthentication(OAuthClientRequest request, RedditApp app) {
          String authString = app.getClientID() + ":" + app.getClientSecret();
          String authStringEnc = DatatypeConverter.printBase64Binary(authString.getBytes());
          request.addHeader(HEADER_AUTHORIZATION, "Basic " + authStringEnc);
      }
docs: Add the basic authentication protocol to the OAuth request using
  the credentials of the Reddit application provided.
  
  @param request OAuth request
  @param app Reddit application