w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using user login information from a Seam webapp in a Spring webapp

The way to configure spring security to read users from a given table is via the DaoAuthenticationProvider, see here the official docs.

There is support for defining how to hashing and salting should be done, bellow is how the XML looks like:

<bean id="daoAuthenticationProvider"
   
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
  <property name="userDetailsService" ref="inMemoryDaoImpl"/>
  <property name="saltSource" ref="saltSource"/>
  <property name="passwordEncoder" ref="passwordEncoder"/>
</bean>

In Java configuration, in the configure method it's possible to instantiate a DaoAuthenticationProvider, configure it and pass it to the AuthenticationManagerBuilder using the API auth.authenticationProvider(...).





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.