Class InitialAdminBootstrapService
java.lang.Object
com.svenruppert.jsentinel.bootstrap.InitialAdminBootstrapService
Single-entry orchestrator that converts a
CreateInitialAdminCommand
into either a freshly created administrator or a non-leaking failure
code.
The double-check + create + invalidate sequence runs inside a
ReentrantLock, so two parallel setup requests cannot both create
an administrator. The password array is wiped before the method
returns regardless of outcome.
-
Constructor Summary
ConstructorsConstructorDescriptionInitialAdminBootstrapService(BootstrapStateService stateService, BootstrapTokenStore tokenStore, AdministratorAccountStore administratorStore, PasswordHashingService passwordHashingService, PasswordPolicy passwordPolicy) InitialAdminBootstrapService(BootstrapStateService stateService, BootstrapTokenStore tokenStore, AdministratorAccountStore administratorStore, PasswordHashingService passwordHashingService, PasswordPolicy passwordPolicy, Duration tokenValidity, Clock clock) -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
InitialAdminBootstrapService
public InitialAdminBootstrapService(BootstrapStateService stateService, BootstrapTokenStore tokenStore, AdministratorAccountStore administratorStore, PasswordHashingService passwordHashingService, PasswordPolicy passwordPolicy) -
InitialAdminBootstrapService
public InitialAdminBootstrapService(BootstrapStateService stateService, BootstrapTokenStore tokenStore, AdministratorAccountStore administratorStore, PasswordHashingService passwordHashingService, PasswordPolicy passwordPolicy, Duration tokenValidity, Clock clock)
-
-
Method Details
-
createInitialAdmin
-