Skip to content

Commit 5aeff39

Browse files
committed
Refactor(#42): VALIDATION_URI을 static으로 변경
1 parent 460de87 commit 5aeff39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/google-oauth-client/src/main/java/com/wypl/googleoauthclient/GoogleOAuthClient.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
@RequiredArgsConstructor
3030
@Component
3131
public class GoogleOAuthClient {
32+
private static final String VALIDATION_URI = "https://www.googleapis.com/oauth2/v1/tokeninfo";
3233

3334
private final GoogleOAuthProperties googleOAuthProperties;
3435
private final RestTemplate restTemplate;
35-
private final String VALIDATION_URI = "https://www.googleapis.com/oauth2/v1/tokeninfo";
3636

3737
public GoogleTokenResponse fetchGoogleOAuthToken(String code) {
3838
MultiValueMap<String, String> params = GoogleOAuthParamFactory
@@ -59,8 +59,8 @@ public GoogleTokenValidationResponse validateToken(String accessToken) {
5959

6060
try {
6161
return restTemplate.getForObject(VALIDATION_URI + "?access_token={access_token}"
62-
, GoogleTokenValidationResponse.class
63-
, params);
62+
, GoogleTokenValidationResponse.class
63+
, params);
6464
} catch (HttpClientErrorException e) {
6565
throw new GoogleOAuthException(GoogleOAuthErrorCode.INVALID_TOKEN);
6666
}

0 commit comments

Comments
 (0)