Implementing a 2 Legged OAuth Provider

前端 未结 2 862
粉色の甜心
粉色の甜心 2021-01-31 22:07

I\'m trying to find my way around the OAuth spec, its requirements and any implementations I can find and, so far, it really seems like more trouble than its worth because I\'m

2条回答
  •  孤街浪徒
    2021-01-31 22:12

    I would take a step back and think about what a properly authenticated client is going to be sending you.

    Can you store the keys and credentials in a common database which is accessible from both sets of services, and just implement the OAuth provider in one language? When the user sends in a request to a service (PHP or Java) you then check against the common store. When the user is setting up the OAuth client then you do all of that through either a PHP or Java app (your preference), and store the credentials in the common DB.

    There are some Oauth providers written in other languages that you might want to take a look at:

    • PHP - http://term.ie/oauth/example/ (see bottom of page)
    • Ruby - http://github.com/mojodna/sample-oauth-provider
    • .NET http://blog.bittercoder.com/PermaLink,guid,0d080a15-b412-48cf-b0d4-e842b25e3813.aspx

提交回复
热议问题