IBM Domino/Websphere authentication works by placing an encrypted cookie for a given domain. There are a number of ways to find out what this cookie means.
For instance, you could either:
1. Decrypt the cookie using the secret key in the domino directory; or
2. Pass that cookie along to a live domino server and get back the username.
In this example, we are going to use the second option. This means we take that cookie and then pass it to an IBM server to check the authentication.
The cookie is stored in as LTPA token. Here is the ruby on rails code:
# accesses the current user from the session.
# overwrite this to set how the current user is retrieved from the session.
# To store just the whole user model in the session:
# def current_user
@current_user ||= session[:user]
tokenstring = "LtpaToken="
tokenstring = tokenstring + cookies[:LtpaToken] if cookies[:LtpaToken]
OpenURI.open_uri('http://[your domino server here]/[your database]/[some page that returns the username]',
"Cookie" => tokenstring) do |http|
@current_user = http.read.strip
On the domino side, you just need to create a database and then a page within the database that has a field returning @username().
This will then return the full username. If you are using QuickPlace for instance, you will get back something like "CN=user/OU=placename/OU=QP/O=certifier" and you can deal with this as you like in your ruby code.