-
Notifications
You must be signed in to change notification settings - Fork 3
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
JWT 굿바이~ #81
Comments
@Pyohwan JSESSIONID 발급해서 다른 api 제대로 동작하는지 확인해주세요. |
@silverprize
|
@Pyohwan https://staging.jakduk.com:8080/swagger-ui.html#!/User/addSocialUserUsingPOST |
새로 말아서 줘야 해여. 자동 로그인. 안되면 제 잘못 |
@Pyohwan response에 JSESSIONID 없어요 |
@silverprize https://staging.jakduk.com:8080/swagger-ui.html#!/Authentication/loginSNSUserUsingPOST |
로그아웃은 /api/auth/logout |
@Pyohwan https://staging.jakduk.com:8080/swagger-ui.html#!/User/addSocialUserUsingPOST 에서 가입성공하면 JSESSIONID 못주나요? |
@silverprize 가입하고 나서 무조건 JSESSIONID 줄려고 했는데, 살펴보니 request 날릴때 JSESSIONID가 존재하면 새로 발급을 안해주더라고요. SNS 가입할때에는 request 시 JSESSEIONID가 존재해야하기 때문에 발급이 안되요. 반면 이메일 가입은 발급 해줄거에요. 아무튼 이부분 더 찾아볼께요. |
인증은 세션+쿠키를 쓰도록 바꿨습니다. 스프링이 제공해주는걸로 하는것이 가장 나은것 같네요.
쿠키는 톰캣에서 말아주는 JSESSIONID와 remember-me가 있어요. 이 두가지만 잘 들고 다니면 문제 없을듯.. (기존 x-auth-token 헤더는 날아갔습니다)
https://staging.jakduk.com:8080/swagger-ui.html#/Authentication
(참고로 이메일 로그인은 스웨거에 안나옴)
삭제 API
GET /api/auth/refresh JWT 토큰 갱신
변경 API
POST /api/login/social/{providerId} SNS 기반 로그인 (존재 하지 않는 회원이면 신규가입 진행)
->
POST /api/auth/login/{providerId} SNS 기반 로그인 (존재 하지 않는 회원이면 신규가입 진행)
path만 바뀌었음
.
GET /api/social/attempt SNS 기반 회원 가입시 필요한 회원 프로필 정보
->
GET /api/auth/user/attempt SNS 기반 회원 가입시 필요한 회원 프로필 정보
path 변경 및 x-attempt-token 파라미터 삭제.
.
POST /api/login 이메일 기반 로그인
->
POST /api/auth/login 이메일 기반 로그인
가장 크게 바뀐것인데 contentType이 application/json -> application/x-www-form-urlencoded
body는 remember-me 파라미터 추가
예제
curl -i -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "username=test05@test.com&password=2111&remember-me=true" http://localhost:8080/api/auth/login
The text was updated successfully, but these errors were encountered: