Skip to content

HW4 Authorization 구현 시 확인할 점 #342

@veldic

Description

@veldic

이것 저것 구현하다보니 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 남깁니다

Metadata

Metadata

Assignees

No one assigned

    Labels

    HW4androidtipShare your knowledge and experience!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions