Package org.happyfaces.services.UserService

Examples of org.happyfaces.services.UserService.HappyfacesUserDetails


    /**
     * Return currently logged in user.
     */
    public static User getLoggedInUser() {
        try {
            HappyfacesUserDetails authenticatedUser = (HappyfacesUserDetails) ((SecurityContext) SecurityContextHolder.getContext()).getAuthentication()
                    .getPrincipal();
            return authenticatedUser.getUser();
        } catch (Throwable e) {
            log.error("Error getting logged in user", e);
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of org.happyfaces.services.UserService.HappyfacesUserDetails

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.