Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are steps a simple http C++ server should perform to let user login via OpenID authentication?

I have created a simple server accepting tcp and http requests and parsing them in C++. Now I want to create an openID login system which would support Google open ID. I use boost and Curl in my server. Currently I have no ssh in my server except curl can make ssh requests.

So what do I have:

  • html get/posts requests parsing into maps of map<string, string>
  • curl with ssh support
  • file returning server functionality (with modified response arguments)

What else shall I implement to support the possibility of google OpenID login? (I need only some basic unique identifier from user - not his\her name or any other details)

What shall be my steps in order to get unique user ID in server that recieved request with something like openIdLogin :https://www.google.com/accounts/o8/id in it?

I need some simple, readable instructions like once provided by google for reCAPTCHA Verifying the User's Answer Without Plugins - where shall user be redirected, what shall be in Request, Response etc. (not pure Specs)

like image 727
Rella Avatar asked Jul 21 '11 13:07

Rella


2 Answers

From the open ID wiki

http://enthusiasm.cozy.org/archives/2005/05/openid-part-iii-pingpong

Open ID Flow Diagram

or from Google's own doc

http://code.google.com/apis/accounts/docs/OpenID.html#Interaction

Open ID Flow Diagram

like image 88
bradgonesurfing Avatar answered Nov 13 '22 11:11

bradgonesurfing


What it sounds like you are looking for is Google's Federated Login. What it basically amounts to is sending some url requests to Google's servers and providing a callback url where you want the user to return to after they login on Google's servers.

Towards the bottom of the page there are some sample requests and responses that should help you get started.

like image 20
Patrick Costello Avatar answered Nov 13 '22 10:11

Patrick Costello