Skip to content
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

로그인과 회원가입에서 사용될 요청과 예시 #3

Open
KimMin-Gwan opened this issue Aug 19, 2024 · 1 comment
Open

로그인과 회원가입에서 사용될 요청과 예시 #3

KimMin-Gwan opened this issue Aug 19, 2024 · 1 comment

Comments

@KimMin-Gwan
Copy link
Owner

KimMin-Gwan commented Aug 19, 2024

post 요청

  • json의 필수 입력 사항은 아래와 같다.
header = {
    "request-type" : "default",
    "client-version" : 'v1.0.1',
    "client-ip" : '127.0.0.1',
    "uid" : '1234-abcd-5678', 
    "endpoint" : "/user_system/", 
}
send_data = {
    "header" : header,
    "body" : {
        'email' : '[email protected]',

    }
}

로그인을 시도하기 위한 요청

  • 목적 : 로그인 시도를 위한 email과 password 데이터
  • url : http://nova-platform.kr/user/try_login
  • 기타 : 로그인에 성공하면 result가 true로 반환, 함께 token을 주는데 이를 cookie 같은곳에 저장할것
  • send_data 예시
send_data = {
    "header" : header,
    "body" : {
        'email' : '[email protected]',
        'password' : 'sample122'
    }
}
  • 응답 예시
    캡처

회원가입 에서 이메일을 전송

  • 목적 : 이메일 중복을 막고, 이메일 인증을 하기 위해서사용
  • url : http://nova-platform.kr/user/try_send_email
  • 기타 : post 요청하고 True 가 반환되면 해당 이메일로 인증 코드 메일이 갔을꺼임, 테스트 할때는 본인 이메일 주소를 사용해보는것이 좋음
  • send_data 예시
send_data = {
    "header" : header,
    "body" : {
        'email' : '[email protected]',
    }
}
  • 응답 예시
    캡처
    캡처

회원가입 시도

  • 목적 : 회원가입을 시도함
  • url : http://nova-platform.kr/user/try_sign_in
  • 기타 : 올바른 인증 코드가 맞는지도 여기서 검사함, True가 반환되면 정상적으로 로그인 했으며, 로그인에 성공했다면 token 정보를 cookie같은 곳에 저장할것
  • send_data 예시
send_data = {
    "header" : header,
    "body" : {
            'email' : '[email protected]',
            'verification_code' : 1234,
            'password' : 'sample1234',
            'age' : "24",
            'gender' : 'male',
    }
}
  • 응답 예시
    캡처
@KimMin-Gwan
Copy link
Owner Author

성별이 기타일때는 'etc' 성별 제공 안하면 'none' 으로 부탁드립니다요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant