Skip to content

Commit

Permalink
Use simple security config DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Scott Brown committed Mar 26, 2015
1 parent 1513219 commit 4d25c13
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 41 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ dependencies {
console "org.grails:grails-console"

runtime 'org.grails.plugins:ajax-tags:1.0.0.RC1'
compile 'org.springframework.boot:spring-boot-starter-security'

compile 'org.grails.plugins:simple-spring-security:1.0.0.BUILD-SNAPSHOT'
}

task wrapper(type: Wrapper) {
Expand Down
17 changes: 17 additions & 0 deletions grails-app/conf/simpleSpringSecurity.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
security = {
authorize {
authenticated "/status/**", "/updateStatus/**", "/users/**", "/unfollow/**", "/follow/**"
}

loginUrl '/login'
logoutSuccessUrl '/'
csrf false
}

users = {
inMemory {
newUser username: 'jeff', password: 'password', roles: ['USER']
newUser username: 'graeme', password: 'password', roles: ['USER']
newUser username: 'lari', password: 'password', roles: ['USER']
}
}
1 change: 0 additions & 1 deletion grails-app/conf/spring/resources.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Place your Spring DSL code here
beans = {
securityConfig org.grails.twitter.auth.WebSecurityConfig
}
39 changes: 0 additions & 39 deletions src/main/groovy/org/grails/twitter/auth/WebSecurityConfig.groovy

This file was deleted.

0 comments on commit 4d25c13

Please sign in to comment.