@@ -0,0 +1,2140 @@
+/*%0A * Copyright (c) 2011-2019 Contributors to the Eclipse Foundation%0A *%0A * This program and the accompanying materials are made available under the%0A * terms of the Eclipse Public License 2.0 which is available at%0A * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0%0A * which is available at https://www.apache.org/licenses/LICENSE-2.0.%0A *%0A * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0%0A */%0Apackage io.vertx.ext.auth.oauth2.providers;%0A%0Aimport io.vertx.codegen.annotations.VertxGen;%0Aimport io.vertx.core.Vertx;%0Aimport io.vertx.core.http.HttpClientOptions;%0Aimport io.vertx.core.json.JsonObject;%0Aimport io.vertx.ext.auth.oauth2.OAuth2Auth;%0Aimport io.vertx.ext.auth.oauth2.OAuth2FlowType;%0Aimport io.vertx.ext.auth.oauth2.OAuth2Options;%0A%0A/**%0A * Simplified factory to create an %7B@link OAuth2Auth%7D for Gitee.%0A *%0A * @author %3Ca href=%22mailto:gitee@oschina.cn%22%3EGitee%3C/a%3E%0A */%0A@VertxGen%0Apublic interface GiteeAuth %7B%0A%0A  /**%0A   * Create a OAuth2Auth provider for Gitee%0A   *%0A   * @param clientId     the client id given to you by Gitee%0A   * @param clientSecret the client secret given to you by Gitee%0A   */%0A  static OAuth2Auth create(Vertx vertx, String clientId, String clientSecret) %7B%0A    return create(vertx, clientId, clientSecret, new HttpClientOptions());%0A  %7D%0A%0A  /**%0A   * Create a OAuth2Auth provider for Gitee%0A   *%0A   * @param clientId          the client id given to you by Gitee%0A   * @param clientSecret      the client secret given to you by Gitee%0A   * @param httpClientOptions custom http client options%0A   */%0A  static OAuth2Auth create(Vertx vertx, String clientId, String clientSecret, HttpClientOptions httpClientOptions) %7B%0A    return%0A      OAuth2Auth.create(vertx, new OAuth2Options()%0A        .setHttpClientOptions(httpClientOptions)%0A        .setFlow(OAuth2FlowType.AUTH_CODE)%0A        .setClientId(clientId)%0A        .setClientSecret(clientSecret)%0A        .setSite(%22https://gitee.com%22)%0A        .setTokenPath(%22/oauth/token%22)%0A        .setAuthorizationPath(%22/oauth/authorize%22)%0A        .setUserInfoPath(%22https://gitee.com/api/v5/user%22)%0A        .setHeaders(new JsonObject().put(%22User-Agent%22, %22vertx-auth-oauth2%22)));%0A  %7D%0A%7D%0A

add gitee oauth provider