List of usage examples for org.springframework.security.authentication.dao DaoAuthenticationProvider DaoAuthenticationProvider
public DaoAuthenticationProvider()
From source file:com.swordcode.webcore.security.server.SecurityConfig.java
@Bean public AuthenticationProvider authenticationProvider() { DaoAuthenticationProvider ap = new DaoAuthenticationProvider(); ap.setUserDetailsService(userDetailsService()); ap.setPasswordEncoder(passwordEncoder()); return ap;/*from w w w . jav a 2 s. co m*/ }
From source file:com.itn.configuration.SecurityConfiguration.java
@Bean public DaoAuthenticationProvider authenticationProvider() { DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setUserDetailsService(userDetailsService); authenticationProvider.setPasswordEncoder(passwordEncoder()); return authenticationProvider; }
From source file:com.econcept.init.ServiceConfig.java
@Bean public AuthenticationProvider getAuthenticationService() { DaoAuthenticationProvider lProvider = new DaoAuthenticationProvider(); // Use SHA-256 ShaPasswordEncoder lEncoder = new ShaPasswordEncoder(256); lEncoder.setIterations(1000);/* w w w .jav a2 s . c om*/ ReflectionSaltSource lSource = new ReflectionSaltSource(); lSource.setUserPropertyToUse("getUserID"); lProvider.setPasswordEncoder(lEncoder); lProvider.setSaltSource(lSource); lProvider.setUserDetailsService(getUserProvider()); /* User lUser = new User(); lUser.setUserName("admin_username"); String lTest = lEncoder.encodePassword("admin_password", lSource.getSalt(lUser)); System.out.println(lTest); System.out.println(lEncoder.isPasswordValid(lTest, "admin_password", lSource.getSalt(lUser))); lProvider.setUserDetailsService(mUserProvider); */ return lProvider; }
From source file:com.juliuskrah.multipart.security.SecurityConfig.java
@Bean public AuthenticationProvider authenticationProvider() { DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setUserDetailsService(userDetailsService); authenticationProvider.setPasswordEncoder(passwordEncoder); return authenticationProvider; }
From source file:de.metas.ui.web.config.SecurityConfig.java
@Bean public AuthenticationProvider authenticationProvider() { final DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setUserDetailsService(userDetailsService); // authenticationProvider.setPasswordEncoder(new ShaPasswordEncoder()); return authenticationProvider; }
From source file:io.github.proxyprint.kitchen.config.WebSecurityConfig.java
@Bean public DaoAuthenticationProvider authenticationProvider() { DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setUserDetailsService(userDetailsService); return authenticationProvider; }
From source file:es.galvarez.rest.config.SpringSecurityConfiguration.java
@Bean public DaoAuthenticationProvider daoAuthenticationProvider() { DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(); authProvider.setUserDetailsService(userRepository); return authProvider; }
From source file:cn.cuizuoli.gotour.config.SecurityConfig.java
@Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setUserDetailsService(userDetailsService()); authenticationProvider.setPasswordEncoder(NoOpPasswordEncoder.getInstance()); auth.authenticationProvider(authenticationProvider); }
From source file:com.toptal.conf.SecurityConfiguration.java
/** * Creates dao authentication provider.//w w w. j a v a 2 s. c om * @return Authentication provider. * @checkstyle DesignForExtensionCheck (10 lines) */ @Bean public DaoAuthenticationProvider authenticationProvider() { final DaoAuthenticationProvider prov = new DaoAuthenticationProvider(); prov.setUserDetailsService(this.userDetails()); prov.setPasswordEncoder(this.passwordEncoder()); return prov; }
From source file:ch.javaee.basicMvc.config.SecurityConfig.java
@Bean public DaoAuthenticationProvider authenticationProvider() { DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(); authenticationProvider.setPasswordEncoder(passwordEncoder()); authenticationProvider.setSaltSource(reflectionSaltSource()); authenticationProvider.setUserDetailsService(myUserDetailsService); return authenticationProvider; }