Class SeedRegisteredClientsUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.clients.SeedRegisteredClientsUseCase
Use case that registers the configured clients (built from
DefaultClientDefinitions) that are missing. It
is idempotent: a client that already exists is left untouched, including its secret.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientRegistrationRepositoryPort that stores the clients.private final PasswordHasherPort that encodes secrets. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRegisters the missing clients among the given definitions.
-
Field Details
-
clientRegistrationRepository
Port that stores the clients. -
passwordHasher
Port that encodes secrets.
-
-
Constructor Details
-
SeedRegisteredClientsUseCase
public SeedRegisteredClientsUseCase()
-
-
Method Details
-
execute
Registers the missing clients among the given definitions.- Parameters:
definitions- the clients this deployment seeds; a client that is not configured is not in the list.clientSecrets- clear-text secrets by client id, taken from the environment; only needed for the confidential clients that do not exist yet.- Returns:
- the ids of the clients that were created and of those skipped; a confidential client without a secret is skipped and does not prevent the other clients from being created.
-