Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Last active July 7, 2016 06:33
Show Gist options
  • Save LeoHeo/a2ce4e5911fd0520e817b6418aebb1b9 to your computer and use it in GitHub Desktop.
Save LeoHeo/a2ce4e5911fd0520e817b6418aebb1b9 to your computer and use it in GitHub Desktop.
django_rest_framework & JWT Auth

Signup

client

  • /api/token/auth check
  • 일반회원가입: email, name, password, job [Post]
  • 소셜회원가입: token [post] -> server에서 FB, KAKAO로 token가지고 통신
  • 성공
    • response statuscode 201 login처리
  • 기존 회원
    • response status code 201이 아닌경우 별도 처리

server

  • django.authenticate로 기존회원인지 한번 더 체크
    • 기존 회원인 사람은 login 페이지로
  • job이 맞지 않으면 exception
  • 회원가입 성공하면 Token Response

Login

  • /api/token/auth check
  • status code 201
    • login 처리
  • status code 201이 아닌경우
    • 별도처리,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment