문제

REST API가 현재 작업하고있는 REST API의 경우 OAUTH 버전 1.0을 탐색 해 왔습니다.

3 개의 인증 시나리오가 있습니다

  1. 이는 3 자, 서비스 제공 업체, 소비자 및 사용자가 포함됩니다.3 다리가있는 OAuth 가이 시나리오와 일치합니다.
  2. 2 파티가 소비자 및 서비스 제공 업체가 포함되어 있습니다.이는 2- 다리가있는 OAuth가 가장 적합 할 수있는 시나리오이며, 그렇다면 내 이해에 기초한 이와 HTTP 기본 인증의 차이가 거의 없기 때문에 프로세스가 무엇인지 만하면됩니다.
  3. 사용자의 권한없이 현재 로그인 한 사용자의 데이터에 항상 액세스 할 수있는 특별한 유형의 사용자를 만들고 있습니다.OAuth를 여전히 구현 하면서이 이미지가 그림에 맞을 수 있습니다.

    이 시나리오를 사용 하는가?OAuth를 깔끔하게 구현할 수있는 방법은 어떻게 할 수 있으며 어떻게이 도움을 줍니까? 3 다리와 2 다리가있는 OAuth 프로세스를 이해할 수 있습니까?

도움이 되었습니까?

해결책

Number 1: Correct, just use the typical 3-legged oauth flow.

Number 2. 2-legged oauth is pretty much the same as http-basic, except that the oauth signature gives you protection agains MITM attacks (but if you use http-basic over TLS than you get the same protection). The process for 2-legged oauth is just the signing of the request with the consumer key/secret which is synonymous with a username/password over http basic.

Number 3. I'm not 100% clear on what you mean here, but it sounds similar to how google uses 2-legged oauth for google apps domains. Take a look at their documentation here: https://developers.google.com/accounts/docs/OAuth#GoogleAppsOAuth

Have you looked into OAuth 2.0? It's still in draft, but it has a lot more flexibility for different scenarios. May be something to consider. http://oauth.net/2/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top