Class ConfigUserStore.ConfigUser

java.lang.Object
io.helidon.security.providers.httpauth.ConfigUserStore.ConfigUser
All Implemented Interfaces:
SecureUserStore.User
Enclosing class:
ConfigUserStore

public static class ConfigUserStore.ConfigUser extends Object implements SecureUserStore.User
User configuration.
  • Constructor Details

    • ConfigUser

      @Deprecated(forRemoval=true) public ConfigUser()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default constructor.
  • Method Details

    • create

      public static ConfigUserStore.ConfigUser create(Config config)
      Create a new user from configuration.
      Parameters:
      config - configuration
      Returns:
      a new user
    • login

      public String login()
      Description copied from interface: SecureUserStore.User
      Get login name.
      Specified by:
      login in interface SecureUserStore.User
      Returns:
      login of the user
    • isPasswordValid

      public boolean isPasswordValid(char[] passwordA)
      Description copied from interface: SecureUserStore.User
      Check if the password is valid. Used by basic authentication.
      Specified by:
      isPasswordValid in interface SecureUserStore.User
      Parameters:
      passwordA - password of the user as obtained via basic authentication
      Returns:
      true if password is valid for this user, false otherwise
    • roles

      public Set<String> roles()
      Description copied from interface: SecureUserStore.User
      Get set of roles the user is in.
      Specified by:
      roles in interface SecureUserStore.User
      Returns:
      roles of this user (or empty if not supported).
    • digestHa1

      public Optional<String> digestHa1(String realm, HttpDigest.Algorithm algorithm)
      Description copied from interface: SecureUserStore.User
      Digest authentication requires a hash of username, realm and password. As password should not be revealed by systems, this is to provide the HA1 (from Digest Auth terminology) based on the known (public) information combined with the secret information available to user store only (password).

      ha1 algorithm (unq stands for "unquoted value")

          ha1 = md5(a1);
          a1 = unq(username-value) ":" unq(realm-value) ":" passwd
       
      Specified by:
      digestHa1 in interface SecureUserStore.User
      Parameters:
      realm - configured realm
      algorithm - algorithm of the hash (current only MD5 supported by Helidon)
      Returns:
      a digest to use for validation of incoming request
    • toString

      public String toString()
      Overrides:
      toString in class Object