Class ConfigUserStore.ConfigUser
java.lang.Object
io.helidon.security.providers.httpauth.ConfigUserStore.ConfigUser
- All Implemented Interfaces:
SecureUserStore.User
- Enclosing class:
ConfigUserStore
A user that is loaded from configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigUserStore.ConfigUserCreate a new user from configuration.digestHa1(String realm, HttpDigest.Algorithm algorithm) Digest authentication requires a hash of username, realm and password.booleanisPasswordValid(char[] password) Check if the password is valid.login()Get login name.roles()Get set of roles the user is in.toString()
-
Constructor Details
-
ConfigUser
public ConfigUser()
-
-
Method Details
-
create
Create a new user from configuration. The configuration must be located on the user's node.- Parameters:
config- configuration instance- Returns:
- a new config user with the configured login, password, and roles
-
login
Description copied from interface:SecureUserStore.UserGet login name.- Specified by:
loginin interfaceSecureUserStore.User- Returns:
- login of the user
-
isPasswordValid
public boolean isPasswordValid(char[] password) Description copied from interface:SecureUserStore.UserCheck if the password is valid. Used by basic authentication.- Specified by:
isPasswordValidin interfaceSecureUserStore.User- Parameters:
password- password of the user as obtained via basic authentication- Returns:
trueif password is valid for this user,falseotherwise
-
roles
Description copied from interface:SecureUserStore.UserGet set of roles the user is in.- Specified by:
rolesin interfaceSecureUserStore.User- Returns:
- roles of this user (or empty if not supported).
-
digestHa1
Description copied from interface:SecureUserStore.UserDigest 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 (
unqstands for "unquoted value")ha1 = md5(a1); a1 = unq(username-value) ":" unq(realm-value) ":" passwd- Specified by:
digestHa1in interfaceSecureUserStore.User- Parameters:
realm- configured realmalgorithm- algorithm of the hash (current only MD5 supported by Helidon)- Returns:
- a digest to use for validation of incoming request
-
toString
-