Package com.ketayao.ketacustom.shiro

Examples of com.ketayao.ketacustom.shiro.ShiroUser


   
    if (!StringUtils.isNotBlank(result)) {
      return;
    }
   
    ShiroUser shiroUser = SecurityUtils.getShiroUser();
   
    //result = shiroUser.toString() + ":" + result;
   
    LogInfo logInfo = new LogInfo();
    logInfo.setCreateTime(new Date());
   
    logInfo.setUsername(shiroUser.getLoginName());
    logInfo.setMessage(result);
    logInfo.setIpAddress(shiroUser.getIpAddress());
    logInfo.setLogLevel(logLevel);
   
    logInfoService.saveOrUpdate(logInfo);
  }
View Full Code Here


 
  @Log(message="{0}登录了系统。")
  @RequiresUser
  @RequestMapping(value="", method=RequestMethod.GET)
  public String index(ServletRequest request, Map<String, Object> map) {
    ShiroUser shiroUser = SecurityUtils.getShiroUser();
   
    Module menuModule = getMenuModule(SecurityUtils.getSubject());

    map.put(SecurityConstants.LOGIN_USER, shiroUser.getUser());
    map.put("menuModule", menuModule);

    LogUitls.putArgs(LogMessageObject.newWrite().setObjects(new Object[]{shiroUser.getLoginName()}));
    return INDEX;
  }
View Full Code Here

    return getShiroUser().getUser();
  }
 
  public static ShiroUser getShiroUser() {
    Subject subject = getSubject();
    ShiroUser shiroUser = (ShiroUser)subject.getPrincipal();
   
    return shiroUser;
  }
View Full Code Here

TOP

Related Classes of com.ketayao.ketacustom.shiro.ShiroUser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.