Thursday, April 24, 2008

Busy time in Grails plugin land: Announcing the OpenID plugin

It are busy times in Grails plugin land. This week the Searchable Plugin 0.4.1, Acegi Plugin 0.2.1, and the Authentication Plugin 1.0 were already released. And I've just added another one myself: the OpenID Plugin

While Marc Palmer was releasing his Authentication plugin, I was working one a OpenID plugin myself. When I was reading through the Authentication plugin documentation I really got inspired by some features of it. So I borrowed/copied some concepts of it to the OpenID plugin. Thanks Marc!

The OpenID plugin does all the plumbing to communicate with OpenID providers (using the OpenID4Java library) to authenticate/identify users for your website. The great thing is that you are in full control where the controller and the OpenID providers will redirect to in case of successfull login or error.

Here is an example:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main" />
<openid:css />
<div class="nav">
<span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
</div class="body">

<div class="errors">
<openid:form success="[action:'loggedin']">
<openid:input size="30" value="http://" /> (e.g.
<g:submitButton name="login" value="Login" />

For full documentation see:

1 comment:

jsbournival said...

Well done mijn vriend. It works perfectly. Will use it right away.