-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
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
Modify/#66 modify authority #67
Conversation
โฆํ ๊ตฌ๋ณํ๊ฒ ๋ณ๊ฒฝ
/** | ||
* HttpServletRequest๋ HttpServletResponse ๊ฐ์ฒด๊ฐ Service ๊ณ์ธต์ผ๋ก ๋์ด๊ฐ๋ ๊ฒ์ ์ข์ง ์๋ค. | ||
* request, response๋ ์ปจํธ๋กค๋ฌ ๊ณ์ธต์์ ์ฌ์ฉ๋๋ ๊ฐ์ฒด์ด๋ฉฐ, Service ๊ณ์ธต์ด request์ response๋ฅผ ์ ํ์๊ฐ ์๋ค. | ||
*/ | ||
String accessToken = tokenProvider.resolveAccessToken(request); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค ๋ฐฐ์๊ฐ๋๋ค!๐
@GetMapping("/myhome") //ํ์ ํ ์กฐํ (์๊ฐ์ ์ฃผ๋ฏผ ๊ตฌ๋ถ์ ์๋น์ค ๋จ ๋ด์์) | ||
public ApiResponseDto<HomeResponseDto> getHome(@AuthenticationPrincipal User user) { | ||
Long memberId = memberRepository.getMemberByEmail(user.getUsername()).getId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controller์์ repository๋ฅผ ํธ์ถํ๋ ๊ฒ์ด ์ํคํ
์ฒ ๊ด์ ์ด๋ ์ ์ง ๋ณด์ ์ธก๋ฉด์์ ์ข์ง ์์ ๊ฒ ๊ฐ์์
email ์ ๋ณด๋ฅผ service๋ก ๋๊ฒจ์ service ๋ด์์ repository๋ฅผ ํธ์ถํด์ ํด๋น ์ด๋ฉ์ผ์ ์ ์ ๊ฐ ์๋์ง๋ฅผ ๊ฒ์ฆํ๋๋ก ํ๋๊ฒ ์ด๋จ๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์คํ๋ง ์ํ๋ฆฌํฐ role ์ ์ฉํ๋ค๋ ๊ตฟ๊ตฟ!๐
๊ทผ๋ฐ ์ธ์ ์ฝ๋๊น....
๐ ๊ด๋ จ ์ด์
closed #66
URL์ด ๋ง์ด ๋ฐ๋์ด์ ์์ง์ merge ์ํ๋๊ฒ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
โจ ๊ณผ์ ๋ด์ฉ
๐ธ ์คํฌ๋ฆฐ์ท(์ ํ)
๐ ๋ ํผ๋ฐ์ค (๋๋ ์๋ก ์๊ฒ ๋ ๋ด์ฉ) ํน์ ๊ถ๊ธํ ์ฌํญ๋ค