Class UserUtils

java.lang.Object
com.espacogeek.geek.utils.UserUtils

public abstract class UserUtils extends Object
  • Constructor Details

    • UserUtils

      public UserUtils()
  • Method Details

    • isValidPassword

      public static boolean isValidPassword(String password)
      Validate the password.
      Returns:
      true if the given password flow all rules and false if password doesn't flow any rule.
    • getUserID

      public static Integer getUserID(org.springframework.security.core.Authentication authentication)
      Extracts the user ID from the given authentication object. The user ID is assumed to be stored in an authority with the prefix "ID_".
      Parameters:
      authentication - the authentication object
      Returns:
      the user ID