I am new to Spring and Spring Security. I just need a pointer in the right direction:
I have a simple Spring MVC / Spring Security webapp. I want to add web application login functionality. I have created the following two tables.
CREATE TABLE "users" ( "USER_ID" NUMBER(10) NOT NULL, "USERNAME" VARCHAR(45) NOT NULL, "PASSWORD" VARCHAR(45) NOT NULL, "ENABLED" NUMBER(1) NOT NULL, PRIMARY KEY ("USER_ID") ) CREATE TABLE "user_roles" ( "USER_ROLE_ID" NUMBER(10) NOT NULL, "USER_ID" NUMBER(10) NOT NULL, "AUTHORITY" VARCHAR(45) NOT NULL, PRIMARY KEY ("USER_ROLE_ID"), CONSTRAINT "FK_user_roles" FOREIGN KEY ("USER_ID") REFERENCES "users" ("USER_ID") )
I want to authenticate the user from the database, then checks the user role. I know that this is just dirt, so I just need to hear how the process should go.
java spring authentication spring-mvc spring-security
Raje
source share