Examples of LoxiaUserDetailsAware


Examples of loxia.struts2.LoxiaUserDetailsAware

    }
   
    if(authentication != null && authentication.getPrincipal()instanceof LoxiaUserDetails){   
      LoxiaUserDetails userDetails = (LoxiaUserDetails)authentication.getPrincipal();
      if(action instanceof LoxiaUserDetailsAware){
        LoxiaUserDetailsAware aware = (LoxiaUserDetailsAware)action;
        aware.setLoxiaUserDetails(userDetails);
      }
      if(userDetails.getCurrentOu() == null){
        logger.debug("Set CurrentOu for develope purpose. Current Ou:{}",userDetails.getUser().getOu().getName());
        userDetails.setCurrentOu(userDetails.getUser().getOu());
      }
View Full Code Here

Examples of loxia.struts2.LoxiaUserDetailsAware

  @Override
  public boolean preHandle(HttpServletRequest request,
      HttpServletResponse response, Object handler) throws Exception {
    if(handler instanceof LoxiaUserDetailsAware){
      LoxiaUserDetailsAware aware = (LoxiaUserDetailsAware)handler;
     
      Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
      if(authentication != null && authentication.getPrincipal()instanceof LoxiaUserDetails){
        LoxiaUserDetails userDetails = (LoxiaUserDetails)authentication.getPrincipal();
        aware.setLoxiaUserDetails(userDetails);
      }     
    }
    return true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.