|
|
|
@ -3,6 +3,7 @@ package cn.estsh.i3plus.core.apiservice.auth.realm;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.base.ISystemLoginService;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.shirotoken.AdminToken;
|
|
|
|
|
import cn.estsh.i3plus.pojo.platform.bean.SessionUser;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import org.apache.shiro.authc.AuthenticationException;
|
|
|
|
|
import org.apache.shiro.authc.AuthenticationInfo;
|
|
|
|
|
import org.apache.shiro.authc.AuthenticationToken;
|
|
|
|
@ -47,12 +48,9 @@ public class AdminAuthRealm extends AuthorizingRealm {
|
|
|
|
|
SessionUser sessionUser = systemLoginService.queryCheckAdminLogin(( AdminToken ) authenticationToken);
|
|
|
|
|
LOGGER.info("管理员令牌验证:{}", sessionUser);
|
|
|
|
|
return new SimpleAuthenticationInfo(sessionUser, (( AdminToken ) authenticationToken).getLoginPwd(), this.getName());
|
|
|
|
|
// }catch (ImppBusiException e){
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// throw new AuthenticationException();
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
throw new AuthenticationException();
|
|
|
|
|
throw new AuthenticationException(e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|