List of usage examples for org.springframework.security.config.annotation.authentication.builders AuthenticationManagerBuilder jdbcAuthentication
public JdbcUserDetailsManagerConfigurer<AuthenticationManagerBuilder> jdbcAuthentication() throws Exception
From source file:com.nirwansyah.dicka.security.KonfigurasiSecurity.java
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(datasource).usersByUsernameQuery(SQL_LOGIN) .authoritiesByUsernameQuery(SQL_PERMISSION); }
From source file:com.pegawai.app.SecurityConfig.java
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource) .usersByUsernameQuery("select username, password, 'true' enabled from pegawai where username = ?") .authoritiesByUsernameQuery("select username, role as authority from pegawai where username = ?"); }
From source file:com.examplee.SecurityConfig.java
public void configAuthentication(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource) .usersByUsernameQuery("select username,password, enabled from users where username=?") .authoritiesByUsernameQuery("select username, role from user_roles where username=?"); }
From source file:com.msyla.usergreeter.user.config.AuthenticationManagerConfig.java
@Override public void init(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource); }
From source file:com.revze.crudspring.config.SecurityConfig.java
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource).usersByUsernameQuery(SQL_LOGIN) .authoritiesByUsernameQuery(SQL_ROLE); }
From source file:com.pw.ism.WebSecurityConfig.java
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource) .usersByUsernameQuery("select sso_id, password, state from APP_USER where sso_id=?") .passwordEncoder(passwordEncoder).authoritiesByUsernameQuery( "SELECT app_user.sso_id, user_profile.type FROM public.app_user_user_profile, public.app_user, public.user_profile WHERE app_user.id = app_user_user_profile.user_id AND user_profile.id = app_user_user_profile.user_profile_id AND app_user.sso_id = ?"); }
From source file:com.esa.infocontrol.config.spring.SecurityConfig.java
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(baseData()).passwordEncoder(getPasswordEncoder()).rolePrefix("ROLE_") .getUserDetailsService().setEnableGroups(true); }
From source file:app.igogo.WebSecurityConfig.java
@Autowired public void configAuthentication(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource).passwordEncoder(bCryptPasswordEncoder()) .usersByUsernameQuery("select userid,passwd, enabled from users where userid=?") .authoritiesByUsernameQuery("select userid, role from user_roles where userid=?"); }
From source file:com.aplikasi.penjualan.config.KonfigurasiSecurity.java
@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(ds).usersByUsernameQuery(SQL_LOGIN) .authoritiesByUsernameQuery(SQL_PERMISSION); }
From source file:com.cami.spring.SecurityConfig.java
@Autowired public void configAuthentication(AuthenticationManagerBuilder auth) throws Exception { auth.jdbcAuthentication().dataSource(dataSource).passwordEncoder(passwordEncoder()) .usersByUsernameQuery(//from w w w . j a v a 2 s .c o m "select username,password, enabled from users where enabled=true and username=?") .authoritiesByUsernameQuery("select user_username, role from user_roles where user_username=?"); }