Record Class AcmeState.Account

java.lang.Object
java.lang.Record
zeroecho.pki.server.acme.AcmeState.Account
Record Components:
accountId - stable account identifier
directoryId - owning directory identifier
directoryRevision - frozen directory revision
directoryPolicyCommitment - frozen directory-policy commitment
keyThumbprint - SHA-256 account-key thumbprint
publicKeySpki - canonical account public-key encoding
status - account lifecycle state
contacts - bounded account contact URIs
termsAgreed - whether the subscriber agreed to current terms
eabPolicyCommitment - optional external-account-binding policy commitment
createdAt - server-authoritative creation time
updatedAt - server-authoritative last-update time
commitment - commitment to the complete account record
keyHistory - append-only authenticated key identities and known administrative exclusions
Enclosing class:
AcmeState

public static record AcmeState.Account(String accountId, String directoryId, int directoryRevision, String directoryPolicyCommitment, String keyThumbprint, byte[] publicKeySpki, AcmeState.AccountStatus status, List<String> contacts, boolean termsAgreed, Optional<String> eabPolicyCommitment, Instant createdAt, Instant updatedAt, String commitment, List<AcmeState.AccountKeyIdentity> keyHistory) extends Record
Durable protocol-scoped ACME account.
  • Constructor Details

    • Account

      public Account(String accountId, String directoryId, int directoryRevision, String directoryPolicyCommitment, String keyThumbprint, byte[] publicKeySpki, AcmeState.AccountStatus status, List<String> contacts, boolean termsAgreed, Optional<String> eabPolicyCommitment, Instant createdAt, Instant updatedAt, String commitment, List<AcmeState.AccountKeyIdentity> keyHistory)
      Validates account identity, bounded public material, PII and commitments.
    • Account

      public Account(String accountId, String directoryId, int directoryRevision, String directoryPolicyCommitment, String keyThumbprint, byte[] publicKeySpki, AcmeState.AccountStatus status, List<String> contacts, boolean termsAgreed, Optional<String> eabPolicyCommitment, Instant createdAt, Instant updatedAt, String commitment)
      Creates an account with its initial validated key identity. The enrollment authority adds configured exclusion aliases before durable creation.
      Parameters:
      accountId - account identity
      directoryId - owning directory identity
      directoryRevision - exact directory revision
      directoryPolicyCommitment - frozen directory policy
      keyThumbprint - authenticated JWK thumbprint
      publicKeySpki - validated account public key
      status - account status
      contacts - bounded contacts
      termsAgreed - terms acceptance
      eabPolicyCommitment - optional external binding commitment
      createdAt - creation time
      updatedAt - update time
      commitment - complete record commitment
  • Method Details

    • publicKeySpki

      public byte[] publicKeySpki()
      Returns the account public key.
      Returns:
      defensive copy of canonical subject-public-key information
    • 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.
    • accountId

      public String accountId()
      Returns the value of the accountId record component.
      Returns:
      the value of the accountId record component
    • directoryId

      public String directoryId()
      Returns the value of the directoryId record component.
      Returns:
      the value of the directoryId record component
    • directoryRevision

      public int directoryRevision()
      Returns the value of the directoryRevision record component.
      Returns:
      the value of the directoryRevision record component
    • directoryPolicyCommitment

      public String directoryPolicyCommitment()
      Returns the value of the directoryPolicyCommitment record component.
      Returns:
      the value of the directoryPolicyCommitment record component
    • keyThumbprint

      public String keyThumbprint()
      Returns the value of the keyThumbprint record component.
      Returns:
      the value of the keyThumbprint record component
    • status

      public AcmeState.AccountStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • contacts

      public List<String> contacts()
      Returns the value of the contacts record component.
      Returns:
      the value of the contacts record component
    • termsAgreed

      public boolean termsAgreed()
      Returns the value of the termsAgreed record component.
      Returns:
      the value of the termsAgreed record component
    • eabPolicyCommitment

      public Optional<String> eabPolicyCommitment()
      Returns the value of the eabPolicyCommitment record component.
      Returns:
      the value of the eabPolicyCommitment record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • updatedAt

      public Instant updatedAt()
      Returns the value of the updatedAt record component.
      Returns:
      the value of the updatedAt record component
    • commitment

      public String commitment()
      Returns the value of the commitment record component.
      Returns:
      the value of the commitment record component
    • keyHistory

      public List<AcmeState.AccountKeyIdentity> keyHistory()
      Returns the value of the keyHistory record component.
      Returns:
      the value of the keyHistory record component