Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit 535e29b

Browse files
author
rvanderwerf
committed
Grails 4/Spring Security 5 Support - fix password matching for security questions
1 parent 40d8dd9 commit 535e29b

File tree

12 files changed

+44
-21
lines changed

12 files changed

+44
-21
lines changed

examples/extended/build.gradle

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ apply plugin:"org.grails.grails-gsp"
2424

2525
repositories {
2626
mavenLocal()
27+
mavenCentral()
2728
maven { url "https://repo.grails.org/grails/core" }
2829
}
2930

@@ -46,14 +47,14 @@ dependencies {
4647
compile "org.grails.plugins:scaffolding"
4748
compile "org.grails.plugins:events"
4849
compile "org.grails.plugins:hibernate5"
49-
compile "org.hibernate:hibernate-core:5.1.5.Final"
50+
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
5051
compile "org.grails.plugins:gsp"
5152
console "org.grails:grails-console"
5253
profile "org.grails.profiles:web"
5354
runtime "org.glassfish.web:el-impl:2.1.2-b03"
5455
runtime "com.h2database:h2"
5556
runtime "org.apache.tomcat:tomcat-jdbc"
56-
testCompile "org.grails:grails-test-mixins:3.3.0"
57+
//testCompile "org.grails:grails-test-mixins:3.3.0"
5758
runtime "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
5859
testCompile "org.grails:grails-gorm-testing-support"
5960
testCompile "org.grails:grails-web-testing-support"
@@ -64,16 +65,27 @@ dependencies {
6465
testCompile "org.seleniumhq.selenium:selenium-chrome-driver:3.6.0"
6566
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.6.0"
6667
testCompile "org.seleniumhq.selenium:selenium-api:3.6.0"
68+
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-support
69+
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.6.0'
70+
6771
testCompile("io.github.bonigarcia:webdrivermanager:2.2.4") {
6872
exclude group: 'org.seleniumhq.selenium'
6973
}
7074

7175
compile 'dumbster:dumbster:1.6', { transitive = false }
7276
compile "org.grails.plugins:mail:$mailVesion"
7377

74-
compile("org.grails.plugins:spring-security-acl:$springSecurityAclVersion") {
78+
79+
compile("org.grails.plugins:spring-security-acl:4.0.0.BUILD-SNAPSHOT") {
80+
exclude group: 'org.grails.plugins', module: 'spring-security-core'
81+
}
82+
83+
/*
84+
compile("org.grails.plugins:spring-security-acl:3.1.2") {
7585
exclude group: 'org.grails.plugins', module: 'spring-security-core'
7686
}
87+
*/
88+
7789
compile project(":spring-security-ui")
7890
}
7991

@@ -84,7 +96,7 @@ webdriverBinaries {
8496

8597
bootRun {
8698
jvmArgs('-Dspring.output.ansi.enabled=always')
87-
addResources = true
99+
sourceResources sourceSets.main
88100
}
89101

90102
assets {

examples/extended/gradle.properties

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
grailsVersion=3.3.1
2-
gormVersion=6.1.7.RELEASE
3-
gradleWrapperVersion=3.5
1+
grailsVersion=4.0.0.M2
2+
gormVersion=7.0.0.BUILD-SNAPSHOT
3+
gradleWrapperVersion=4.9
44
mailVesion=2.0.0.RC6
5-
springSecurityAclVersion=3.1.1
5+
hibernateCoreVresion=
6+
springSecurityAclVersion=5.1.2.RELEASE
7+
hibernateCoreVersion=5.3.7.Final

examples/extended/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip

examples/extended/grails-app/conf/application.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
grails.plugin.springsecurity.userLookup.userDomainClassName = 'test.User'
55
grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'test.UserRole'
66
grails.plugin.springsecurity.authority.className = 'test.Role'
7+
grails.plugin.springsecurity.password.algorithm = 'bcrypt'
8+
grails.plugin.springsecurity.password.hash.iterations = 1
79
grails.plugin.springsecurity.controllerAnnotations.staticRules = [
810
[pattern: '/', access: ['permitAll']],
911
[pattern: '/error', access: ['permitAll']],

examples/extended/grails-app/conf/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ environments:
114114
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
115115
test:
116116
dataSource:
117-
dbCreate: update
117+
dbCreate: create-drop
118118
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
119119
production:
120120
dataSource:

examples/extended/src/integration-test/groovy/test/ProfileServiceSpec.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package test
22

3-
import grails.test.mixin.integration.Integration
3+
44
import grails.gorm.transactions.Rollback
5+
import grails.testing.mixin.integration.Integration
6+
import grails.testing.services.ServiceUnitTest
7+
import org.spockframework.runtime.model.SpecInfo
58
import spock.lang.Specification
69
import org.hibernate.SessionFactory
710

examples/simple/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ dependencies {
4646
compile "org.grails.plugins:scaffolding"
4747
compile "org.grails.plugins:events"
4848
compile "org.grails.plugins:hibernate5"
49-
compile "org.hibernate:hibernate-core:5.1.5.Final"
49+
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
5050
compile "org.grails.plugins:gsp"
5151
console "org.grails:grails-console"
5252
profile "org.grails.profiles:web"
@@ -68,6 +68,9 @@ dependencies {
6868
testCompile "org.seleniumhq.selenium:selenium-chrome-driver:3.6.0"
6969
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.6.0"
7070
testCompile "org.seleniumhq.selenium:selenium-api:3.6.0"
71+
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-support
72+
testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.6.0'
73+
7174

7275
compile 'dumbster:dumbster:1.6', { transitive = false }
7376
compile "org.grails.plugins:mail:$mailVesion"
@@ -82,7 +85,7 @@ webdriverBinaries {
8285

8386
bootRun {
8487
jvmArgs('-Dspring.output.ansi.enabled=always')
85-
addResources = true
88+
sourceResources sourceSets.main
8689
}
8790

8891

examples/simple/gradle.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
grailsVersion=3.3.1
2-
gormVersion=6.1.7.RELEASE
3-
gradleWrapperVersion=3.5
1+
grailsVersion=4.0.0.M2
2+
gormVersion=7.0.0.BUILD-SNAPSHOT
3+
gradleWrapperVersion=4.9
44
mailVesion=2.0.0.RC6
5-
springSecurityAclVersion=3.1.1
5+
springSecurityAclVersion=5.1.2.RELEASE
6+
hibernateCoreVersion=5.3.7.Final
1.56 KB
Binary file not shown.

examples/simple/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip

0 commit comments

Comments
 (0)