I am developing a web-based application in Spring boot and Mongo DB. Now I want to use Apache Shiro for Authentication and Authorisation. Can somebody explain to me the procedure and how to establish a mongo db realm and where to mention the permission-user mapping? Thank You.
2
Answers
There are a few MongoDB realms up on GitHub. I don’t want to link to them as haven’t tried them out, but that would be your best place to start.
Basically you need three component
Then a MongoRealm
and finally a security manager
From now on either Shiro will call your MongoRealm to validate login and permission and you will be able to hadle your collection with classes like
I hope it helps.