Exemplo n.º 1
0
  protected User getLoggedInUser() {
    User result = ServiceLocator.locate(UserService.class).getCurrentAuthenticatedUser();

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

    return currentSubject.isAuthenticated();
  }