mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-16 21:40:42 +08:00
Authentication 优化
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
package org.maxkey.web.contorller;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.util.List;
|
||||
import org.maxkey.constants.ConstantsOperateMessage;
|
||||
import org.maxkey.constants.ConstantsProtocols;
|
||||
@@ -67,7 +68,7 @@ public class AppListController {
|
||||
*/
|
||||
@RequestMapping(value = { "/appList" })
|
||||
public ModelAndView appList(
|
||||
@RequestParam(value = "gridList", required = false) String gridList) {
|
||||
@RequestParam(value = "gridList", required = false) String gridList,Principal principal) {
|
||||
ModelAndView modelAndView = new ModelAndView("main/appList");
|
||||
userInfoService.updateGridList(gridList);
|
||||
modelAndView.addObject("appList", queryAccessableApps());
|
||||
|
||||
@@ -25,13 +25,12 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.maxkey.authn.AbstractAuthenticationProvider;
|
||||
import org.maxkey.authn.BasicAuthentication;
|
||||
import org.maxkey.authn.LoginCredential;
|
||||
import org.maxkey.authn.support.kerberos.KerberosService;
|
||||
import org.maxkey.authn.support.rememberme.AbstractRemeberMeService;
|
||||
import org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService;
|
||||
import org.maxkey.authn.support.wsfederation.WsFederationConstants;
|
||||
import org.maxkey.configuration.ApplicationConfig;
|
||||
import org.maxkey.constants.ConstantsOperateMessage;
|
||||
import org.maxkey.constants.ConstantsStatus;
|
||||
import org.maxkey.crypto.password.opt.AbstractOptAuthn;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
@@ -185,9 +184,9 @@ public class LoginEndpoint {
|
||||
public ModelAndView logon(
|
||||
HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@ModelAttribute("authentication") BasicAuthentication authentication) throws ServletException, IOException {
|
||||
@ModelAttribute("loginCredential") LoginCredential loginCredential) throws ServletException, IOException {
|
||||
|
||||
authenticationProvider.authenticate(authentication);
|
||||
authenticationProvider.authenticate(loginCredential);
|
||||
|
||||
if (WebContext.isAuthenticated()) {
|
||||
return WebContext.redirect("/forwardindex");
|
||||
|
||||
Reference in New Issue
Block a user