Is there a way to implement multi factor authentication in Shiro? Can somebody give me a hint on how to implement this?
For more details: The basic idea is, that a user needs to login just as usual, using username and password, but before being actually authenticated the user also needs to enter a one-time-token he received as an SMS.
Thank you!
May 11, 2020. 4 MIN READ. Apache Shiro is a Java security framework that can perform authentication, authorization, session management, along with a host of other features for building secure applications.
I finally solved my problem on my own, but I'm of course always open to other suggestions.
I implemented my own 2 - Factor Authentication Flow:
First of all I changed the URL of the login page, to which Shiro redirects an unauthenticated user to my own login page, that leads into the authentication mechanism. A user needs to complete two "stages" to login.
In the end the user will be redirected to the page he/she originally requested, which still allows him/her to bookmark pages. Of course Shiro's remember-me will always be deactivated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With