/**
   * @see javax.security.auth.spi.LoginModule#commit()
   * @return true if committed, false if not (likely not authenticated)
   * @throws LoginException
   */
  public boolean commit() throws LoginException {

    if (!isAuthenticated()) {
      currentUser = null;
      setCommitted(false);
      return false;
    }

    setCommitted(true);
    currentUser.setJAASInfo(subject);
    return true;
  }