Record Class CreateInitialAdminCommand
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.bootstrap.CreateInitialAdminCommand
- Record Components:
bootstrapToken- single-use token issued during first-run bootstrapusername- requested administrator usernamepassword- plain-text password as a char array; will be hashed and may be cleared by the service after usedisplayName- optional human-readable display name, ornullemail- optional contact email, ornull
public record CreateInitialAdminCommand(String bootstrapToken, String username, char[] password, String displayName, String email)
extends Record
Command consumed by
InitialAdminBootstrapService.createInitialAdmin(CreateInitialAdminCommand).
The password field uses char[] so the caller can clear it
after use. The bootstrap service hashes it and clears the array before
returning.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateInitialAdminCommand(String bootstrapToken, String username, char[] password, String displayName, String email) Defensive constructor — rejects null token, username, password. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebootstrapTokenrecord component.Returns the value of thedisplayNamerecord component.email()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.char[]password()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
CreateInitialAdminCommand
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
bootstrapToken
Returns the value of thebootstrapTokenrecord component.- Returns:
- the value of the
bootstrapTokenrecord component
-
username
-
password
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
email
-