开发者

OpenID + HTTP POST request + CLI

I have a Rails app with an API endpoint that I'd like to authenticate using OpenId.

How can I POST to an Ope开发者_如何转开发nID endpoint without involving a GUI?


Technically, you'd have to implement a client in your script.

The script would have to:

  1. Start the authentication on your blog. Your blog should redirect to the OP site.
  2. Authenticate with the OP using whatever method the OP supports.
  3. Follow the redirect to return_to address.

At this point, the script should be authenticated with your blog, and it'd just have to store the session cookie. Subsequent requests can be used with this cookie, so that the script will be authenticated.

If your blog supports it (i.e. doesn't reject uninitiated requests), you could also substitute step 1 with manual discovery and redirection using an RP library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜