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

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

    return currentSubject.isAuthenticated();
  }