AlexCon
AlexCon

Reputation: 1217

Spring Security Core and mongoDB Doesn't Authenticate

I created this project using Grails 2.3.3 and added mongoDB GORM Plugin and Spring Security Core plugin to it. I followed this post spring-security-and-mongodb to make it work, I can see the user and role in mongodb collection, but when I enter username and password the application doesn't authenticate against it, or maybe there is something broken somewhere that says the authentication failed. I attached the project zip file here, can someone look at it and see if I mis-configured something that makes it not-working.

ProjectZipFile

Upvotes: 2

Views: 746

Answers (2)

Burt Beckwith
Burt Beckwith

Reputation: 75681

I used your attached application and the blog post you referenced to create a working application. See http://burtbeckwith.com/blog/?p=1992 for usage information and https://github.com/burtbeckwith/mongoSpringSecurity for the code.

Upvotes: 4

Hussain Fakhruddin
Hussain Fakhruddin

Reputation: 3272

In your BootStrap.groovy file you are saving Role and User objects but you also need to create an association between User and Role using UserRole object.

Upvotes: 0

Related Questions