|
@@ -102,7 +102,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|
|
// 对于app 开放页面,允许任意访问
|
|
|
.antMatchers("/**/open-api/**").permitAll()
|
|
|
// 对于登录login 验证码captchaImage 允许匿名访问
|
|
|
- .antMatchers("/login", "/login/noCode","/captchaImage","/login/studentpassword","/login/studentMobileCode","/login/studentMobile").anonymous()
|
|
|
+ .antMatchers("/login", "/login/noCode","/captchaImage","/login/jscode").anonymous()
|
|
|
//.antMatchers("/student/open/**").permitAll()
|
|
|
.antMatchers("/student/**").hasRole("STUDENT")
|
|
|
.antMatchers(
|
|
@@ -149,11 +149,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|
|
protected void configure(AuthenticationManagerBuilder auth) throws Exception
|
|
|
{
|
|
|
DaoAuthenticationProvider daoAuthenticationProvider = new DaoAuthenticationProvider();
|
|
|
- OpenIdAuthenticationProvider mobileCodeAuthenticationProvider = new OpenIdAuthenticationProvider();
|
|
|
+ OpenIdAuthenticationProvider openIdAuthenticationProvider = new OpenIdAuthenticationProvider();
|
|
|
// daoAuthenticationProvider.setUserDetailsService(userDetailsService);
|
|
|
- mobileCodeAuthenticationProvider.setUserDetailsService(userDetailsService);
|
|
|
+ openIdAuthenticationProvider.setUserDetailsService(userDetailsService);
|
|
|
//ProviderManager providerManager = new ProviderManager(Arrays.asList(mobileCodeAuthenticationProvider,daoAuthenticationProvider));
|
|
|
- auth.authenticationProvider(mobileCodeAuthenticationProvider);
|
|
|
+ auth.authenticationProvider(openIdAuthenticationProvider);
|
|
|
auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder());
|
|
|
|
|
|
}
|