[spring boot]아임포트 본인인증 인증토큰 받아오기
rsp 데이터가 넘어오고 나면, spring boot 에서 아임포트 api를 타서 토큰을 받아와야 한다.
imp_uid는 서버에서 넘어 왔어왓고,
spring boot에 아임포트 라이브러리를 다운받는다.
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<!-- iamport -->
<dependency>
<groupId>com.github.iamport</groupId>
<artifactId>iamport-rest-client-java</artifactId>
<version>0.2.14</version>
</dependency>
자 이렇게 하면 아임포트 클래스를 확인 할 수 있는데
String imp_key = "ㅂㅇㅂㅇㅂㅇㅂㅇ";
String imp_secret = "ㅂㅇㅂㅇㅂㅈㅇㅂㅈㅇ";
웹상에 나와있는 key, secret 등록하고
IamportClient client = new IamportClient(imp_key, imp_secret);
하면 자동인증이 된거기 때문에
아임포트 가이드에서 처럼 '인증정보 조회하기' 처럼 할 필요가 없다.
'server' 카테고리의 다른 글
[spring boot]아임포트 본인인증 origin 문제있는 경험 (0) | 2021.02.15 |
---|---|
[spring boot]아임포트 본인인증 certification 정보 받아오기 (0) | 2021.02.15 |
[spring boot]아임포트 본인인증 rsp.imp_uid받는방법 (0) | 2021.02.15 |
[web]아임포트 본인인증 전화번호(phone), 통신사(carrier) 나오지 않는 이슈 해결방법 (0) | 2021.02.15 |
[spring boot]template might not exist or might not be accessible by any of the configured Template Resolvers 해결방법 (0) | 2021.01.29 |