添加无验证码登录接口

master
hpjpw 5 years ago
parent 672800c59b
commit 63dfeb0987

@ -97,7 +97,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/captchaImage").anonymous()
.antMatchers("/login","/ido/login", "/captchaImage").anonymous()
.antMatchers(
HttpMethod.GET,
"/*.html",

@ -20,7 +20,7 @@ import com.ruoyi.framework.manager.factory.AsyncFactory;
/**
*
*
*
* @author ruoyi
*/
@Component
@ -37,7 +37,7 @@ public class SysLoginService
/**
*
*
*
* @param username
* @param password
* @param code
@ -59,6 +59,19 @@ public class SysLoginService
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
throw new CaptchaException();
}
// 用户验证
return login(username, password);
}
/**
*
*
* @param username
* @param password
* @return
*/
public String login(String username, String password)
{
// 用户验证
Authentication authentication = null;
try

Loading…
Cancel
Save