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

개발자용 인증 Bypass 프로세스 #17

Open
ParkYunHo opened this issue Feb 28, 2023 · 1 comment
Open

개발자용 인증 Bypass 프로세스 #17

ParkYunHo opened this issue Feb 28, 2023 · 1 comment

Comments

@ParkYunHo
Copy link
Contributor

What is the Issues?

개발자용 인증 Bypass 프로세스
개발작업시 일일히 access_token을 발급받아 Header에 전달하기 힘드므로 "개발자용 인증 Bypass" 프로세스를 작업하였음.

Details

Header Format

  • Authorization: DEV {userId}

예제

// 사용자 등록 API cURL (인증 Bypass)
curl -v -X POST "http://localhost:8080/users"
 -H "Authorization: DEV admin1"

// 정석 로직
curl -v -X POST "http://localhost:8080/users"
 -H "Authorization: Bearer S00tVlhva3l4ZzFGX0NTdHVNRzlhQmFFak1GNTFTZ3FLdlAyQWdORmxDaXNNMGdBQUFZWmFPMGw2"

사용시 주의점

  • 모든 API(로그인, 토큰 인코딩 제외)는 기본적으로 "사용자가 등록되어 있음"을 전제로 동작
  • 만약, 서버에 개발자용 UserId가 등록되어 있지 않다면 테스트진행전 미리 사용자등록API를 호출하여 개발자용 UserId를 등록시켜야 한다.
@ParkYunHo
Copy link
Contributor Author

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