user5488223
user5488223

Reputation: 35

springSecurityService add second authentication before building roles

I am using springSecurityService. my flow is as followed: step #1 :springSecurityService should check user & password. if succeeds, step #2: check second authentication. if succeeds, step #3: build roles and log in.

I tried implementing in many ways but no success, can someone please advise? Just to clarify, basically what i need id a two-factor authentication.

Thanks!

Upvotes: 0

Views: 83

Answers (1)

Bobby Akyong
Bobby Akyong

Reputation: 241

step 1:

  • install spring security plugin, for other setting read this

step 2 :

  • use s2-quickstart , example :

    grails s2–quickstart com.yourapp.security User Role RequestMap

step 3 :

  • configure your first account(User / Role / RequestMap) to login in bootstrap.. read this

then you can try to login with default form by spring security..

in grails 3.0 + , you can read this

so in grails 3.0+, you will get default loginController.groovy and UsernamePasswordAuthenticationFilter.groovy by spring security

but if you use grails 2.0+, you can find loginController.groovy in root of your controller's folder...and you can find out UsernamePasswordAuthenticationFilter.groovy too..but i forget that location..you can search it with tools like Intellij or other..

Upvotes: 0

Related Questions