Package com.sivalabs.springapp.web.config

Examples of com.sivalabs.springapp.web.config.SecurityUser


    Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
      if (principal instanceof UserDetails)
      {
        String email = ((UserDetails) principal).getUsername();
        User loginUser = userService.findUserByEmail(email);
        return new SecurityUser(loginUser);
      }
      return null;
     
    }
View Full Code Here


      throws UsernameNotFoundException {
    User user = userService.findUserByEmail(userName);
    if(user == null){
      throw new UsernameNotFoundException("UserName "+userName+" not found");
    }
    return new SecurityUser(user);
  }
View Full Code Here

    Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
      if (principal instanceof UserDetails)
      {
        String email = ((UserDetails) principal).getUsername();
        User loginUser = userService.findUserByEmail(email);
        return new SecurityUser(loginUser);
      }

      return null;
  }
View Full Code Here

TOP

Related Classes of com.sivalabs.springapp.web.config.SecurityUser

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.