Last active
March 9, 2021 05:37
-
-
Save dominicfarr/9637357 to your computer and use it in GitHub Desktop.
example jdbcRealm configured in shiro.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[main] | |
ds = com.mysql.jdbc.Driver | |
ds.serverName = localhost | |
ds.user = user | |
ds.password = password | |
ds.databaseName = db_name | |
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm | |
jdbcRealm.dataSource = $ds | |
jdbcRealm.permissionsLookupEnabled = true | |
jdbcRealm.authenticationQuery = "SELECT password FROM users WHERE user_name = ?" | |
jdbcRealm.userRolesQuery = "SELECT role_name FROM user_rolesWHERE user_name = ?" | |
jdbcRealm.permissionsQuery = "SELECT permission FROM roles_permissions WHERE role_name = ?" | |
authc = org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter | |
authc.loginUrl = /login/ | |
[urls] | |
/login/ = authc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @suchitgupta01,
good question, I have not had the need for it, so I dont know but a quick search got me these, hope it helps!
secure-database-password-in-shiro-ini
shiro-command-line-hasher