I'm adding OpenID login to a small web app using Spring Security 2.0.5. I want to be able to identify users within my application based on the OpenID identifier with which they logged in. This works fine when using Verisign as the provider; each identifier is a user-specific URI like http://jbloggs.pip.verisignlabs.com/, which is easily looked up in my user database to find "Joe Bloggs".
However when a user enters the standard Google OpenID identifier (www.google.com/accounts/o8/id), the identifier sent by Google upon successful authentication (something like https://www.google.com/accounts/o8/id?id=AItOawnKrvwaGk9YU0q9STQGj9G7XIRlNmsjuiI) varies from machine to machine for the same user. This makes it impossible (or at least impractical) to identify that user by looking up their identifier in my user database.
How can I get Google to always send the same identifier for the same Google user?
FWIW, the app runs in JBoss 3.2.7 with embedded Tomcat 5.0.28.