Iím using Spring Security 2.0.3 and want to access the DB using jdbc-user-service to load the user data out of the db (Iím not using the standard schema). I have just one table with users. Each user has a name (= username), a password and a usergroup (= role). How does my authorities-by-username-query and users-by-username-query have to look like? Here is what I got:
I don't get any error messages but I can't login using the correct username and password. I'm using PostgreSQL by the way.
authorities-by-username-query="SELECT U.name, 'ROLE_' || U.usergroup as authority FROM siteuser U WHERE name=?"
users-by-username-query="SELECT U.name, U.password, 'TRUE' AS enabled FROM siteuser U where U.name=?"