Intro to Spring Security Core for Grails

The Spring Security Core plugin for Grails is flat out awesome. In this screencast we will go over the basics of the plugin and how to get up and running quickly.

Part 1

Part 2

My plan is to start releasing a ton of short screencasts focused on Groovy and Grails. If there are any specific tutorials you would like to see please let me know.

Categories: Grails

About The Author

My name is Dan Vega and I am a Software Developer based out of Cleveland OH. I love to play with new technologies and write about my experiences here. When I am not busy being a full time geek I love to lift heavy weights and hang out with friends and family. If you have any questions please don't hesitate to contact me.

Follow me on:
  • eriihine

    Thanks for making these videos! They were much more helpful then the slightly outdated versions in spring security plugin docs.

    If you are doing future videos on this topic can you explain following config:

    grails.plugin.springsecurity.logout.postOnly = true

    If I have this set to true (as it is by default) how should I construct an logout action / link so that it uses post method ?

    Currently if I navigate to /logout/index I get an 405 error.


  • Dan Vega

    First off thank you for the kind words. I plan on releasing more screencasts very soon.

    If you look in the LogoutController you will see some code that looks like this

    if( ! && SpringSecurityUtils.getSecurityConfig().logoout.postOnly) { }

    All this means is that if the logout controller action index is not called via an http post that it should not allow you to logout. You can easily construct a link that looks like this.

    <a href="${createLink(controller: ‘logout’)}">Welcome <sec:emailAddress/> | Logout</a>

  • eriihine

    Thanks for the clarification!

  • Dan Vega

    Just a heads up but I decided to write up a quick post on your question just in case it trips up anyone else.—Logout-postOnly-setting

  • Santosh

    Thanks much for putting up these screencasts. As the others here I’m a beginner and I’ve been having trouble with getting the plugin to work right.

    Just thought I’d leave a comment here and encourage.

  • Eric Pierce

    Thanks for these screencasts, Dan!

    You made it crazy simple to get up and running w/security core here.