Class ConfigUserStore
java.lang.Object
io.helidon.security.providers.httpauth.ConfigUserStore
- All Implemented Interfaces:
SecureUserStore
User store loaded from configuration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.security.providers.httpauth.SecureUserStore
SecureUserStore.User
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SecureUserStore
Create an instance from config.Get user based on login.
-
Constructor Details
-
ConfigUserStore
public ConfigUserStore()
-
-
Method Details
-
create
Create an instance from config. Expects key "users" to be the current key. Example:users: [ { login = "jack" password = "${CLEAR=password}" roles = ["user", "admin"] }, { login = "jill" # master password is "jungle", password is "password" password = "${AES=3XQ8A1RszE9JbXl+lUnnsX0gakuqjnTyp8YJWIAU1D3SiM2TaSnxd6U0/LjrdJYv}" roles = ["user"] } ]
- Parameters:
config
- to load this user store from- Returns:
SecureUserStore
instance
-
user
Description copied from interface:SecureUserStore
Get user based on login. The returned user may not be populated -SecureUserStore.User.roles()
is never called beforeSecureUserStore.User.isPasswordValid(char[])
. Also the missing user and user with wrong password are treated the same - so if your implementation cannot decide whether a user exists until the password is checked, you can delay that decision and just returnfalse
fromSecureUserStore.User.isPasswordValid(char[])
for both cases (e.g. invalid user and invalid password).- Specified by:
user
in interfaceSecureUserStore
- Parameters:
login
- login of the user (as obtained from request)- Returns:
- User information (empty if user is not found)
-