Grails

Programmatically logging in user in jsecurity plugin

In our current project we are using jsecurity plugin and some of our bootstrap code required a user to be logged in. I found a nice blog http://www.tothenew.com/blog/?p=335 on this topic but it was using groovy metaprogramming to override the normal behaviour of SecurityUtils.getSubject() which is suitable for test environment. After...

by Bhagwat Kumar
Tag: jsecurity plugin
04-Mar-2010

Grails

Login user for Integration test when using Jsecurity plugin

Hello Friends, I was using Jsecurity plugin in my project. There was an action in a controller which needed logged in user information and I was finding it difficult to write an integration test for the same. Then Brent Fisher shared the following code which worked nicely for both services and controllers: import...

by Amit Jain
Tag: jsecurity plugin
07-Dec-2009