We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USER
@Override public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException { OAuth2UserInfo oAuth2User = new NaverOAuth2User(super.loadUser(userRequest).getAttributes()); Map<String, Object> attributes = oAuth2User.getAttributes(); Email email = new Email((String)attributes.get("email")); UserEntity user = userRepository.findByEmail(email).orElse(null); attributes.put("accessToken", userRequest.getAccessToken().getTokenValue()); if (user == null) { return oAuth2User; } attributes.put("userId", user.getId()); attributes.put("nickname", user.getNickname()); return new NaverOAuth2User(attributes, List.of(new SimpleGrantedAuthority(AuthRole.USER.getName()))); }
CustomOAuth2Service.java 수정
CustomOAuth2Service.java
The text was updated successfully, but these errors were encountered:
ss0ngcode
Gyaak
No branches or pull requests
수정 전 기능
USER
권한으로 획득USER
로 할당 받아 권한 제어의 문제가 발생수정 후 기능
수정 의도
TODO
CustomOAuth2Service.java
수정The text was updated successfully, but these errors were encountered: