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

HW4 Authorization 구현 시 확인할 점 #342

Open
veldic opened this issue Nov 25, 2020 · 0 comments
Open

HW4 Authorization 구현 시 확인할 점 #342

veldic opened this issue Nov 25, 2020 · 0 comments
Labels
android HW4 tip Share your knowledge and experience!

Comments

@veldic
Copy link
Contributor

veldic commented Nov 25, 2020

이것 저것 구현하다보니 Backend 세미나를 듣지 않았으면 모를 만한 내용이 떠올라서 issue에 올려봅니다!

Authorization이 Token으로 구현되어 있는데
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization
위 링크를 참고하시면 HTTP Header은
Authorization: <type> <credentials>
와 같은 구조를 따라야 합니다.

따라서 안드로이드 내에서 Header에 추가하실 때 OkHttp에 tokenInterceptor 내에서 token값이 있을 때
~~ .header("Authorization", "Token $token") ~~
와 같은 방법으로 추가하셔야 합니다!

혹시나
("Authorization", "$token")이나
("Token", "$token") 등의 방법을 사용하셔서 시간을 허비하실까 싶어 issue 남깁니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android HW4 tip Share your knowledge and experience!
Projects
None yet
Development

No branches or pull requests

1 participant