Module io.inverno.mod.security
Class InMemoryUserRepository.Builder<A extends Identity,B extends User<A>>
java.lang.Object
io.inverno.mod.security.authentication.user.InMemoryUserRepository.Builder<A,B>
- Type Parameters:
A
- the identity typeB
- the user type
public static class InMemoryUserRepository.Builder<A extends Identity,B extends User<A>>
extends Object
A builder used to build in-memory user reposities.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds an in-memory user repository.passwordEncoder
(Password.Encoder<?, ?> passwordEncoder) Specifies the password encoder.passwordPolicy
(PasswordPolicy<B, ?> passwordPolicy) Specifies the password policy.Adds a user to create when initializing the repository.users
(Collection<B> users) Adds users to create when initializing the repository.
-
Method Details
-
user
Adds a user to create when initializing the repository.
- Parameters:
user
- a user- Returns:
- this builder
-
users
Adds users to create when initializing the repository.
- Parameters:
users
- a collection of users- Returns:
- this builder
-
passwordPolicy
Specifies the password policy.
- Parameters:
passwordPolicy
- a password policy- Returns:
- this builder
-
passwordEncoder
Specifies the password encoder.
- Parameters:
passwordEncoder
- a password encoder- Returns:
- this builder
-
build
Builds an in-memory user repository.
- Returns:
- an new in-memory user repository
-