Class AbstractUserDatabase

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.apache.logging.log4j.Logger log  
      protected static java.lang.String SHA_PREFIX  
      protected static java.lang.String SHA256_PREFIX  
      protected static java.lang.String SSHA_PREFIX  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      UserProfile find​(java.lang.String index)
      Looks up and returns the first UserProfile in the user database that whose login name, full name, or wiki name matches the supplied string.
      abstract UserProfile findByEmail​(java.lang.String index)
      Looks up and returns the first UserProfile in the user database that matches a profile having a given e-mail address.
      abstract UserProfile findByFullName​(java.lang.String index)
      Looks up and returns the first UserProfile in the user database that matches a profile having a given full name.
      abstract UserProfile findByLoginName​(java.lang.String index)
      Looks up and returns the first UserProfile in the user database that matches a profile having a given login name.
      abstract UserProfile findByWikiName​(java.lang.String index)
      Looks up and returns the first UserProfile in the user database that matches a profile having a given wiki name.
      protected static java.lang.String generateUid​(UserDatabase db)
      Generates a new random user identifier (uid) that is guaranteed to be unique.
      protected java.lang.String getHash​(java.lang.String text)
      Private method that calculates the salted SHA-1 or SHA-256 hash of a given String.
      java.security.Principal[] getPrincipals​(java.lang.String identifier)
      Looks up the Principals representing a user from the user database.
      abstract void initialize​(Engine engine, java.util.Properties props)
      Initializes the user database based on values from a Properties object.
      UserProfile newProfile()
      Factory method that instantiates a new DefaultUserProfile with a new, distinct unique identifier.
      protected long parseLong​(java.lang.String value)
      Parses a long integer from a supplied string, or returns 0 if not parsable.
      abstract void save​(UserProfile profile)
      Saves a UserProfileto the user database, overwriting the existing profile if it exists.
      boolean validatePassword​(java.lang.String loginName, java.lang.String password)
      Validates the password for a given user.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait