Wednesday, March 18, 2015

Confused with s2-quickstart command in Spring Security Grails ?

The s2-quickstart <package> <user> <role> <requestmap> creates the following artefacts:
  • Creates domain classes:
    • grails-app/domain/package/user.groovy
    • grails-app/domain/package/role.groovy
    • grails-app/domain/package/userrole.groovy
    • grails-app/domain/package/requestmap.groovy (if specified)
  • Creates example GSPs and controllers:
    • grails-app/views/login/auth.gsp
    • grails-app/views/login/denied.gsp
    • grails-app/controllers/LoginController.groovy
    • grails-app/controllers/LogoutController.groovy
  • Adds configuration to Config.groovy:
    • grails.plugins.springsecurity.userLookup.userDomainClassName = 'package.user'
    • grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'package.userrole'
    • grails.plugins.springsecurity.authority.className = 'package.role'

0 comments:

Post a Comment