diff --git a/genti-external/src/main/java/com/gt/genti/openfeign/google/client/GoogleApiClient.java b/genti-external/src/main/java/com/gt/genti/openfeign/google/client/GoogleApiClient.java deleted file mode 100644 index 054552c4..00000000 --- a/genti-external/src/main/java/com/gt/genti/openfeign/google/client/GoogleApiClient.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.gt.genti.openfeign.google.client; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestHeader; - -import com.gt.genti.openfeign.google.dto.response.GoogleInfoResponse; - -@Deprecated -@FeignClient(name = "GoogleApiClient", url = "https://www.googleapis.com") -public interface GoogleApiClient { - - @GetMapping("/oauth2/v3/userinfo") - GoogleInfoResponse googleInfo( - @RequestHeader("Authorization") String token - ); - -} diff --git a/genti-external/src/main/java/com/gt/genti/openfeign/google/client/GoogleAuthApiClient.java b/genti-external/src/main/java/com/gt/genti/openfeign/google/client/GoogleAuthApiClient.java deleted file mode 100644 index 7c459c26..00000000 --- a/genti-external/src/main/java/com/gt/genti/openfeign/google/client/GoogleAuthApiClient.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.gt.genti.openfeign.google.client; - -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; - -import com.gt.genti.openfeign.google.dto.response.GoogleTokenResponse; - -@Deprecated -@FeignClient(name = "GoogleAuthApiClient", url = "https://oauth2.googleapis.com") -public interface GoogleAuthApiClient { - - @PostMapping("/token") - GoogleTokenResponse googleAuth( - @RequestParam(name = "code") String code, - @RequestParam(name = "clientId") String clientId, - @RequestParam(name = "clientSecret") String clientSecret, - @RequestParam(name = "redirectUri") String redirectUri, - @RequestParam(name = "grantType") String grantType); - -} diff --git a/genti-external/src/main/java/com/gt/genti/openfeign/google/dto/response/GoogleInfoResponse.java b/genti-external/src/main/java/com/gt/genti/openfeign/google/dto/response/GoogleInfoResponse.java deleted file mode 100644 index cda08b74..00000000 --- a/genti-external/src/main/java/com/gt/genti/openfeign/google/dto/response/GoogleInfoResponse.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.gt.genti.openfeign.google.dto.response; - -import com.fasterxml.jackson.databind.PropertyNamingStrategies; -import com.fasterxml.jackson.databind.annotation.JsonNaming; - -@Deprecated -@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) -public record GoogleInfoResponse( - String sub, - String name, - String givenName, - String familyName, - String picture, - String email, - Boolean emailVerified, - String locale, - String birthday -) { - public static GoogleInfoResponse of(String sub, String name, String givenName, String familyName, String picture, - String email, Boolean emailVerified, String locale, String birthday) { - return new GoogleInfoResponse(sub, name, givenName, familyName, picture, email, emailVerified, locale, - birthday); - } -} \ No newline at end of file diff --git a/genti-external/src/main/java/com/gt/genti/openfeign/google/dto/response/GoogleTokenResponse.java b/genti-external/src/main/java/com/gt/genti/openfeign/google/dto/response/GoogleTokenResponse.java deleted file mode 100644 index 6a620a87..00000000 --- a/genti-external/src/main/java/com/gt/genti/openfeign/google/dto/response/GoogleTokenResponse.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.gt.genti.openfeign.google.dto.response; - -import com.fasterxml.jackson.databind.PropertyNamingStrategies; -import com.fasterxml.jackson.databind.annotation.JsonNaming; - -@Deprecated -@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) -public record GoogleTokenResponse( - String accessToken, - String refreshToken -) { - public static GoogleTokenResponse of(String accessToken, String refreshToken) { - return new GoogleTokenResponse(accessToken, refreshToken); - } -} \ No newline at end of file