Tuesday 22 April 2008

TaskMaster - Day 4

Two services were created, AuthenticationService and MessagingService. The former service is used for logging in users (especially later on when the authentication methods increase, e.g LDAP, OpenID) and the latter service is to email users for whatever purposes.

A BaseController was created to add in an interceptor and the authorization to all controllers via inheritance:

def beforeInterceptor = [action:this.&auth, except:['login', 'logout', 'register']]

def auth() {
if(!session.user) {
redirect(controller:'user',action:'login')
return false
}
}

Cobbled together a working rough login and registration page. The controllers and views will be the focus from now on.

The other blog is on hiatus for the moment :)

No comments: