From a5dc30d50061632b6d48230a2bf2309afe464d55 Mon Sep 17 00:00:00 2001 From: baesunyoung6767 Date: Mon, 8 Jul 2024 00:58:45 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=EA=B5=AC=EA=B8=80=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=ED=86=A0=ED=81=B0=20=EC=A0=84=EC=86=A1=20?= =?UTF-8?q?api=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/controller/UserController.class | Bin 8221 -> 9896 bytes .../domain/controller/UserController.java | 24 ++++++++++++++++++ .../domain/dto/GoogleTokenRequestDto.java | 13 ++++++++++ 3 files changed, 37 insertions(+) create mode 100644 src/main/java/com/sunjoo/auth/domain/dto/GoogleTokenRequestDto.java diff --git a/build/classes/java/main/com/sunjoo/auth/domain/controller/UserController.class b/build/classes/java/main/com/sunjoo/auth/domain/controller/UserController.class index c0a803226c545410c360508c24047b46696de24b..65cf0663d7719e3478eebf65aed078b198767cf0 100644 GIT binary patch delta 2956 zcmZ`*3wT>)8GgSs$w`ybv`sH*+OZb4uBDfyy8y23MhA559@mz3ZDHV;S$jw`vZia( zb`zu6u??(I^@2?rH^aatz!?G1a;;vDKVQ|&f4zSb;e+qv1`;A ziC-3v30z?#ZY}yC=<&df8+2shoq~c&bG;+qsbNA;Z8quoedEUVU|%$1490_9%{FLpbi5y(f{ajqzlIM8 zmZ;Do71}%)kHq)5aVtKgP~1kim1bvFLHTGr5)HPEM&ps*P;}I23k@}#-kDIr9 z@~V{vpU`nP4p35Kci#X*48enyo6gQ?P=!5dh1K_xGdvp7GA@mVMn=rKqC)e4tE8sM=m@?#eGW+w)!KEtv(* zhjn}bUo`K_-0D1}V+w~&&E4Xi#*Bs|I%ZYEO3NqX?xo&&9M$k89mjBmU^$ol=40+! z&v87a;mbO{f+q90qu6Z9cbLx>WLFCu^wGwCH;&_R9bZ$$yj*E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?BFG3EoA^Nvs03LYsV{E z1+*{BtGwn3Z|D%&z%F)*Q>7c&&Fi9kL+c>s08=cbPU_nw=Wf|nnXB*34t;NV`XW9# z-j=;HmUk6nsOLRT-;$yQp1zolG@K^h{^X0VgwyH6AOu2@LhL4Z%|E zaNg$wG3RTitH`f?6`rDWMRzKy?NC(99`>p})V2#s=)qGoCPmR6Ia3vNPV7TZk%ns6 zt{_)Tf{$D=TF(%Sdv;3KVR~+0-X_jRhvPyYvGruRo>neNV^~=Wc`X#KRj4mP=b5V_ zTXG8->4_|A%hds2%Ex@7dWGWsl+QE`xBuxz?!)!|bC1+A+VO<~3}5n9lJh*>-SeC; ztc1r^wt>r9x!TY0@)R}?Eu=y)iX29#dcW4V!FvlzZgp}^(c3|d; zV81d)1oxv3OMCa?hmds+`lrtJwITh?FD{Z(TyjL>c7d#D<(@Qh?r$Gt3dJPNak58| z>oqUhK@nB8Uqz9e+~J$@+y6_i=793JC#+8Qbo#lY+sK2lp3P*%%9<&Ul{a%nEYIJ} zLO0Ck!30zYx_KZK+U8D3KQL#1NlC)}{rNqNY`> request = new HttpEntity(headers); + ResponseEntity response= restTemplate.exchange(GOOGLE_USERINFO_REQUEST_URL, HttpMethod.GET,request,String.class); + return response; + }catch (Exception e) { + e.printStackTrace(); + return ResponseEntity.internalServerError().build(); + } + } + @GetMapping("/userinfo") public ResponseEntity getUserInfo(@AuthenticationPrincipal UserDetailsImpl userDetails) { log.info("정보 조회 요청 회원 번호 : " + userDetails.getUserNo()); diff --git a/src/main/java/com/sunjoo/auth/domain/dto/GoogleTokenRequestDto.java b/src/main/java/com/sunjoo/auth/domain/dto/GoogleTokenRequestDto.java new file mode 100644 index 0000000..0c53df8 --- /dev/null +++ b/src/main/java/com/sunjoo/auth/domain/dto/GoogleTokenRequestDto.java @@ -0,0 +1,13 @@ +package com.sunjoo.auth.domain.dto; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Getter @Setter +@AllArgsConstructor +@NoArgsConstructor +public class GoogleTokenRequestDto { + String token; +}