develop branch
> feature-user branch
에서 개발하는 이슈들을 기록하는 페이지입니다.
카카오
// userAttributes = delegate.loadUser(userResponse).getUserAttributes() 는 구글에 한하여 유효한 방법이다.
// 네이버 또는 카카오는 HTTP response body에 response 안에 id 값을 포함한 유저정보를 넣어주므로 유저정보를 빼내기 위한 작업을 함
// userAttributes = getUserAttributes(userResponse)
private Map<String, Object> getUserAttributes(ResponseEntity<Map<String, Object>> response) {
Map<String, Object> userAttributes = response.getBody();
if(userAttributes.containsKey("response")) {
LinkedHashMap responseData = (LinkedHashMap)userAttributes.get("response");
userAttributes.putAll(responseData);
userAttributes.remove("response");
}
return userAttributes;
}
카카오 개발자 사이트에서 REST ID 얻기
https://momentjin.tistory.com/144
OAuth2, JWT 예제
스프링 시큐리티 구조