Friday, 17 August 2012

Play 1.2.5 and OpenID

Continuing my drive to write simple examples for features of Play 1, here is an app authenticated by openID:

https://github.com/tomnatt/play-openid-example

It's prepped to use the Google openID system, but that is easily changed in the interface. As with the websockets example, this exists because the existing examples floating around the web are for an older version of Play and don't quite work. In this case, the official docs seem rather sparse too.

Anyway, I found it useful. It's possible someone else will too.

Gotcha on this one - Google doesn't have a personalised URL for using openID. The one in the code is the same for everyone, and is returned with an id parameter so the app can identify the user in question.