I am using the JDBC Realm and storing authentication data in SQL. I am storing the salt in the users table and relying on the DEFAULT_SALTED_AUTHENICATION_QUERY. To invoke that query I must set the SaltStyle.
Therefore, I need to pass the SaltStyle.COLUMN enumerated value to JdbcRealm through the INI.
SaltStyle is not a class so I cannot create a reference
Whatever I do pass generates this error = org.apache.shiro.config.UnresolveableReferenceException:
Can't find examples from exstensive searching or reference in documentation. Any help is much appreciated.
#====================================================================
# Shiro INI configuration
#
# ===================================================================
[main]
JdbcRealm=org.apache.shiro.realm.jdbc.JdbcRealm
JdbcRealm.permissionsLookupEnabled = true
sha256Matcher = org.apache.shiro.authc.credential.HashedCredentialsMatcher
sha256Matcher.hashAlgorithmName=SHA-256
sha256Matcher.hashIterations=1
JdbcRealm.credentialsMatcher = $sha256Matcher
JdbcRealm.saltStyle= enum expression needed here
Here is the property in JdbcRealm
public void setSaltStyle(SaltStyle saltStyle) {
this.saltStyle = saltStyle;
if (saltStyle == SaltStyle.COLUMN && authenticationQuery.equals
(DEFAULT_AUTHENTICATION_QUERY)) {
authenticationQuery = DEFAULT_SALTED_AUTHENTICATION_QUERY;
}
}