-
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
feature: 선생님 회원가입 추가 #32
Conversation
학교 가져오는부분 다시보니까 너무 하드 코딩되어 있어서 리팩터링 해도 괜찮을까? @sominyun |
- model - repository - service - reader - validator - appender - exception
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.
batch 리팩토링 한 거 깔끔하고 보기 좋당~~~~~
근데 나 궁금한게 있는데 이게 소셜 로그인은
socialLogin -> input: accessToken, output: accessToken,refreshToken
인데 선생님 로그인은
Login ->input: 아이디, 비밀번호 -> output: accessToken
이잖아
이게 소셜로그인은 프론트에서 accessToken을 넘겨 주고 우리가 refreshToken을 만들어서 주는 거고
선생님로그인은 프론트에서 아이디랑 비밀번호를 넘겨주면 우리가 accessToken을 만들어서 주고 refreshToken은 사용하지 않는 방식인거야?
|
||
fun loginTeacher(request: LoginTeacher.Request): LoginTeacher.Response{ | ||
val (username, password) = request.convertLoginInfo(passwordEncoder::encode) | ||
val teacher = teacherReader.findByUsernameAndPassword(username, password) |
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.
궁금한게 이거 만약에 유저네임이랑패스워드 없으면 그냥 null 반환되면 예외처리가 어떻게 되는거야???? 그냥 500뜨는거야?
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.
어어어
val (username, password) = request.convertLoginInfo(passwordEncoder::encode) | ||
val teacher = teacherReader.findByUsernameAndPassword(username, password) | ||
return LoginTeacher.Response( | ||
accessToken = jwtProvider.generateTeacherAccessToken(Claims.TeacherClaims(teacher.id)), |
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.
accessToken = jwtProvider.generateTeacherAccessToken(Claims.TeacherClaims(teacher.id)), | |
accessToken = jwtProvider.generateTeacherAccessToken(Claims.TeacherClaims(teacher.id)) |
진짜 별거 아닐수도 있는데 저 , 필요없는거겠지..?
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.
오 이참에 우리 lint도 설정해둘까
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.
좋지~
일단은 선생님의 경우 그렇게 크게 중요한 부분이 아닌것같아서 우선 access token만 반환하도록 만들어뒀어 |
🗃 Issue
🔥 Task
📄 Reference