> I have been a user of the apache shiro library for sometime now when writing
> java applications and most of the configurations are pretty straight
> forward. i am currently learning how to work with grails but I am unable to
> fully understand how to configure and set up jdbc-realms for authentication.
> I don't have the choice of working with the shiro-plugin because I will be
> porting applications written in languages such as php that are already in
> production and have legacy data therefore changing the data structure to
> suit the plugin may not be wise at the moment. Most of them define their Acl
> permissions based on the MPTT (Modified Preorder Tree Transversal) design
> pattern.

You can use standard Shiro realms with the Grails plugin as long as
you declare them as Spring beans. So all you have to do is add
something like this to grails-app/conf/resources.groovy:

    beans = {
        myRealm(MyJdbcRealm)
    }

That's it. The realm will then be used by the plugin's usual
authentication and authorisation code.

Hope that helps,

Peter

Reply via email to