code: protected void asLoginRequired(LoginHandlingResource resource) throws LoginRequiredException {
          logger.debug("...Checking login status for login required");
          if (tryAlreadyLoginOrRememberMe(resource)) {
              checkPermission(resource); // throws if denied
              return; // Good
          }
          if (needsSavingRequestedLoginRedirect(resource)) {
              saveRequestedLoginRedirectInfo();
          }
          throwLoginRequiredException("Cannot access the action: " + resource);
      }
docs: Check as the login-required action.
  @param resource The resource of login handling to determine. (NotNull)
  @throws LoginRequiredException When it fails to access the action for non-login.