Hi All,
I have tried to use the jdbc-user-service out of box but with some customization. It seems that defining the authorities-by-username-query doesn't work at all.
Logs:Code:<authentication-manager> <authentication-provider> <password-encoder hash="md5"/> <!--<user-service id="userDetailsService"/>--> <jdbc-user-service data-source-ref="dataSource" authorities-by-username-query="select EMAIL as username, PASSWORD as password, 'true' as enabled from USER where EMAIL=?" /> </authentication-provider> </authentication-manager>
It's still trying to execute the predefined SQL query.Code:22:40:37,300 DEBUG SQLErrorCodeSQLExceptionTranslator:399 - Translating SQLException with SQL state '42S22', error code '1054', message [Unknown column 'username' in 'field list']; SQL was [select username,password,enabled from users where username = ?] for task [PreparedStatementCallback]
Does anyone know how to fix this issue?
Thanks,
Karim


Reply With Quote
