docs: public static GitLabApi oauth2Login(ApiVersion apiVersion, String url, String username, CharSequence password,
              String secretToken, Map<String, Object> clientConfigProperties, boolean ignoreCertificateErrors) throws GitLabApiException {
  
          if (username == null || username.trim().length() == 0) {
              throw new IllegalArgumentException("both username and email cannot be empty or null");
          }
  
          GitLabApi gitLabApi = new GitLabApi(ApiVersion.OAUTH2_CLIENT, url, (String)null);
          if (ignoreCertificateErrors) {
              gitLabApi.setIgnoreCertificateErrors(true);
          }
  
          class Oauth2Api extends AbstractApi {
              Oauth2Api(GitLabApi gitlabApi) {
                  super(gitlabApi);
              }
          }
  
          try (Oauth2LoginStreamingOutput stream = new Oauth2LoginStreamingOutput(username, password)) {
  
              Response response = new Oauth2Api(gitLabApi).post(Response.Status.OK, stream, MediaType.APPLICATION_JSON, "oauth", "token");
              OauthTokenResponse oauthToken = response.readEntity(OauthTokenResponse.class);
              gitLabApi = new GitLabApi(apiVersion, url, TokenType.OAUTH2_ACCESS, oauthToken.getAccessToken(), secretToken, clientConfigProperties);
              if (ignoreCertificateErrors) {
                  gitLabApi.setIgnoreCertificateErrors(true);
              }
  
              return (gitLabApi);
          }
      }