Example #1
0
  protected User getLoggedInUser() {
    User result = ServiceLocator.locate(UserService.class).getCurrentAuthenticatedUser();

    return result;
  }
Example #2
0
  public boolean isLoggedIn() {
    Subject currentSubject = ServiceLocator.locate(UserService.class).getCurrentSubject();

    return currentSubject.isAuthenticated();
  }