Record Class AuthAccountRequest

java.lang.Object
java.lang.Record
com.cloudforge.core.manager.auth.AuthAccountRequest
Record Components:
username - required by both backends
email - optional
role - one of admin/manager/viewer
initialPassword - required by LocalH2AuthBackend (local accounts have no other way to get a password); ignored by CognitoAuthBackend, which always generates and returns its own temporary password on AuthAccount.temporaryPassword() regardless of what's passed here
suppressInvite - Cognito-only — true for a migration's bulk-created accounts (the temporary password is relayed to the admin instead), false for a single ad-hoc "Add User" from the panel (let Cognito email its own invite). Ignored by LocalH2AuthBackend.
linkedAccountId - optional cross-backend link to record at creation time — see AuthAccount.linkedAccountId()

public record AuthAccountRequest(String username, String email, String role, String initialPassword, boolean suppressInvite, String linkedAccountId) extends Record
Request to create a new account via AuthBackend.createAccount(AuthAccountRequest).
  • Constructor Details

    • AuthAccountRequest

      public AuthAccountRequest(String username, String email, String role, String initialPassword, boolean suppressInvite, String linkedAccountId)
      Creates an instance of a AuthAccountRequest record class.
      Parameters:
      username - the value for the username record component
      email - the value for the email record component
      role - the value for the role record component
      initialPassword - the value for the initialPassword record component
      suppressInvite - the value for the suppressInvite record component
      linkedAccountId - the value for the linkedAccountId record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • email

      public String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • role

      public String role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • initialPassword

      public String initialPassword()
      Returns the value of the initialPassword record component.
      Returns:
      the value of the initialPassword record component
    • suppressInvite

      public boolean suppressInvite()
      Returns the value of the suppressInvite record component.
      Returns:
      the value of the suppressInvite record component
    • linkedAccountId

      public String linkedAccountId()
      Returns the value of the linkedAccountId record component.
      Returns:
      the value of the linkedAccountId record component