java


Spring Security authentication from custom tables


I was looking into spring security, it has good features, but my requirement is bit different.
I have one table: 1. Employee (fields ename, epassword)
I want to authenticate user from this table but using spring security.
I know spring security has kinda feature of enable and ROLE but didn't able to get how I can get authentication from my table.
I have seen some examples and google certain link but some good links will be more helpful.
You can have cutom UserDetaialsService and give an implementation for loadUserByUsername(String username) to load user info from database. After that you can have custom implementation of AuthenticationProvider which uses your custom UserDetailsService to authenticate the user. Spring security is also having same kind of implementation to authenticate the user from table but have some limitation on table structure etc. you can have a look on DaoAuthenticationProvider to implement your own AuthenticationProvider and JdbcDaoImpl to have your custom UserDetailsService.

Related Links

How do I fix my hibernate hbm.xml file to make my composite primary keys work? (MappingException)
Java deadlock with one lock
Gson fromJson and toJson for simple object returning null in Java
How to repeat audio file in java
Random int function behavior in Java
Is it necessary to use generics with ArrayList?
String Array throws error-Java
I get a null pointer exception when using an interface in onResponse volley library
Mocking Java objects in my target where target has no setters available
Lowest and highest number in an array
program stopping due java.lang.NullPointerException: Attempt to invoke virtual method [duplicate]
Is there a more efficient way to create new variables in a for loop?
Java CardLayout does not change Panel until unrelated loop is finished
Elastic search tokenizer &filter for Split the given data
Nested XML pull parser issue ,cannot get child elements
Taking from a file then summing the integers but getting 0 as answer

Categories

HOME
cloud
deployment
blogger
debugging
azure-data-factory
heroku
raspberry-pi
react-router
jsp-tags
bookshelf.js
tizen-web-app
cakephp-2.5
node-pdfkit
wheelnav.js
designer
graphlab
openrefine
highlight.js
ab-testing
shared-hosting
nodatime
jprofiler
kryo
clickonce
wkwebview
language-agnostic
tibco-mdm
su
rst2pdf
atlassian-crucible
subdomains
objectanimator
google-rich-snippets
directx-10
ecto
gtrendsr
calibre
grails-3.1
asset-pipeline
subset-sum
mozilla
mapbox-gl
mpmediaquery
fusionpbx
wixsharp
devextreme
scaffold
c11
vapor
mesos-chronos
mapzen
sfdc
wptoolkit
jquery-validate
dandelion
integrity
yii2-extension
media-player
ifs
sqlbulkcopy
cudafy.net
color-profile
xcb
medium.com
setuptools
google-feed-api
log4c
sts-springsourcetoolsuite
impresspages
storekit
blackberry-10
whois
rvest
apachebench
eclipse-clp
thredds
retina
simple-framework
rgeo
event-bubbling
operation
fluid-dynamics
p2
formatjs
nsbutton
titanium-modules
markers
html-helper
rebol3
valueconverter
kgdb
ember-charts
cloud-connect
gridfs
dexterity
opcache
seed
sqlperformance
flashvars
browser-detection
gil
runas
automount
onsubmit
code-cleanup
gwt-ext
gnustep
qt-jambi
xmlspy
xdomainrequest
sproutcore-2
xsdobjectgen
filtered-index
ncqrs
simpletest

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App