Skip to content

faizakram/Spring-Dynamic-Role

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-security-dynamic-authorization-and-authentication

Md Faiz Akram
http://faizakram.com/

Avoid intercept url pattern and access dynamically by using sql query in spring security.

use sql query for retriving roles of the requested URL. Generally we use intercept tag in xml along with url and roles attributes. we can avoid this tag and we can retrive those information form db.

you also found custom UserDetailsService implementaion for getting authentication.

Steps

  1. import db.sql file into to your db.
  2. import thisp project into your fav editor (eclipse).
  3. specify you db properties in Constants.properties file.
  4. run the porject.

Database having following tables

  1. User
  2. Roles
  3. action
  4. User_roles
  5. roles_actions

Releases

No releases published

Packages

No packages published

Languages