onefC demo application: usage
The demo application for onefC is a very sophisticated web application: it shows a personalised greeting with any name of your choice! Ain't that exciting? Well, most people would say "no". But the trick is: this web application does not ask you for your name via a HTML form, but it uses the onefC identity and session infrastructure. It runs on a special web server, which accepts onefC sessions. A local proxy (on your side) initiates the session and associates it to your request. The server application then asks your local identity manager for your name: that's the place you have to answer it. Once you answered, the personalised greeting is sent back to your browser. Of course, it really is not that exciting, but it demonstrates how sessions are set up and how attributes can be requested. Just imagine, it could also ask for your favourite colour! ;-)
But before you can try it out yourself, you need to install a few software and configure your system (onefC is quite invasive).
Using the demo application
Once you're done installing and configuring your system,
- start up your proxy (runScone.sh or runScone.bat)
- start up your identity and session management client (the extension in firefox)
- keep this page open (otherwise you won't know what's happening, or why nothing seems to be happening!)
- and point your browser (the one you configured to use the proxy) to the personalised greeting web application
Now, several things happen, before you can see the result.
- First, the proxy analyses your request, and asks the server for a session service address. In case the server actually answers this HTTP HEAD request (and our one does!), the proxy command line says "found session service for http://onefc.informatik.uni-hamburg.de/onefC/GetSessionServiceAddress at itcp://134.100.5.71:7269". Now the proxy builds a session with that session server, adds the session ID of this session to the HTTP headers of the request and finally passes it to the web server.
- The web application analyses the HTTP headers. If it finds a session ID in the headers and also in the server's session adapter, it sends an attribute request to your identity and session management client. By now you should have a look at that client. The tab "Profile Management" is still empty, you don't have and don't know any digital identities. But the next tab, "Session Management" shows a session request (labelled "new" and also an attribute request ("GetProperty") in the lower left pane.
Now select the session request and click "Accept" directly above it. You be rewarded with an entry in the "Managed Sessions" list, upper left pane. Select it.
Now the panes on the right are filled with fresh representations of session identities, or rather session pseudonyms. Until now they have no attributes or anything, but that's ok. Select the property request and choose "Answer". A dialog box appears.
If you had already selected a digital identity to be associated with this session pseudonym, and this identity had an attribute matching to the request, you could choose it here. But you don't, so just enter your name in the "Create a new instance" text field and hit "OK". You can't check the policy of that attribute, because you have not entered an APPEL rule for it yet, so just ignore that button, please (although it _does_ work!). Your answer will be sent to the session adapter on the server side, which informs the web application about it, and finally your browser will receive the answer. The name is coloured red, not to annoy you, but to show that it was retrieved via a onefC session. Also, the HTTP headers of the request are shown.
Now you can start playing with the tools. If you hit the reload button, you will get the greeting instantly, because the server caches the identity information. If you want to try again, type "quit" in the proxy console and restart it, then reload the page. But before you do that, try the "Choose Identity" button in the "Local Session Member" pane of the identity management client. You'll get an empty list jut like the one you got when answering the request. Type a nick for a new identity into the "Create a new Identity" text field (it may very well be the same as your name, like in the screenshot), hit OK, and you have created your first persistent digital identity! You can see it in the "Profile Management" tab once you have restarted the client (sorry about that...), but there actually is no need for that.
Now you have the chance to aquire the "Name" property of the session identity to your persistant, digital identity. Just hit the "Aquire" button. The next time anyone asks for your Name, you can choose to use this identity for that session (by using the "Choose Identity" button of course), and you'll be offered the aquired name in the "answer property" dialog. Try this out by restarting your proxy and visiting the demo application again.
Sourcecode
The complete source code for this example is available, with the exception of the WBI library used by Scone (which is free for non-commercial use... and we would not recommend to make money with this example ;-)). The source code for Scone can be found on the Scone Homepage. The source code for the onefC scone plugin is available here. The source code for the onefC session API (used by the Scone plugin and the web server session adapter), the mozidm identity and session management Firefox extension and the example web application can be received via CVS from our onefC sourceforge project page. Binary and source releases will follow soon.
Troubleshooting
Of course, several things can go wrong using this demo application. Please, first make sure you followed the instructions to install the software and configure your system closely. Then, check your proxy settings. Then, check whether the demo server actually is alive (it should redirect you to http://vsis-www.informatik.uni-hamburg.de/projects/onefc/).