Apache Shiro- using DataBase to read users, roles and permissions
Currently I've a swing app and I wan't to implement Apache Shiro in order
to Authenticate and delegate permissions to certain roles. I've already
managed myself to read the users from the Shiro.ini file that I've created
for tests, it looks something like this
[users]
admin = 123456, Administrator
[role]
Administrator = *:*:*
However I've stored in a database a table with the info I need and it
looks something like this:
users (id,password,username) userRoles (userId, role) rolePermission
(permissionID,permission,roleID)
I've been trying to understand tutorials that use a JDBC realm, however
they use web applications or specials frameworks to manage their
connection to the DataBase like Apache Derby or BoneCP, and they confuse
me even more with these examples.
So what I'm asking it's how I need to configure the Shiro.ini file if I
wanna use a JDBC realm (with an oracle database) and what classes the
Shiro.ini needs. Any examples or explanation will be appreciated!
No comments:
Post a Comment