Record Class AcmeState.Account
java.lang.Object
java.lang.Record
zeroecho.pki.server.acme.AcmeState.Account
- Record Components:
accountId- stable account identifierdirectoryId- owning directory identifierdirectoryRevision- frozen directory revisiondirectoryPolicyCommitment- frozen directory-policy commitmentkeyThumbprint- SHA-256 account-key thumbprintpublicKeySpki- canonical account public-key encodingstatus- account lifecycle statecontacts- bounded account contact URIstermsAgreed- whether the subscriber agreed to current termseabPolicyCommitment- optional external-account-binding policy commitmentcreatedAt- server-authoritative creation timeupdatedAt- server-authoritative last-update timecommitment- commitment to the complete account recordkeyHistory- 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 Summary
ConstructorsConstructorDescriptionAccount(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.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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountIdrecord component.Returns the value of thecommitmentrecord component.contacts()Returns the value of thecontactsrecord component.Returns the value of thecreatedAtrecord component.Returns the value of thedirectoryIdrecord component.Returns the value of thedirectoryPolicyCommitmentrecord component.intReturns the value of thedirectoryRevisionrecord component.Returns the value of theeabPolicyCommitmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyHistoryrecord component.Returns the value of thekeyThumbprintrecord component.byte[]Returns the account public key.status()Returns the value of thestatusrecord component.booleanReturns the value of thetermsAgreedrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.
-
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 identitydirectoryId- owning directory identitydirectoryRevision- exact directory revisiondirectoryPolicyCommitment- frozen directory policykeyThumbprint- authenticated JWK thumbprintpublicKeySpki- validated account public keystatus- account statuscontacts- bounded contactstermsAgreed- terms acceptanceeabPolicyCommitment- optional external binding commitmentcreatedAt- creation timeupdatedAt- update timecommitment- complete record commitment
-
-
Method Details
-
publicKeySpki
public byte[] publicKeySpki()Returns the account public key.- Returns:
- defensive copy of canonical subject-public-key information
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
accountId
-
directoryId
Returns the value of thedirectoryIdrecord component.- Returns:
- the value of the
directoryIdrecord component
-
directoryRevision
public int directoryRevision()Returns the value of thedirectoryRevisionrecord component.- Returns:
- the value of the
directoryRevisionrecord component
-
directoryPolicyCommitment
Returns the value of thedirectoryPolicyCommitmentrecord component.- Returns:
- the value of the
directoryPolicyCommitmentrecord component
-
keyThumbprint
Returns the value of thekeyThumbprintrecord component.- Returns:
- the value of the
keyThumbprintrecord component
-
status
-
contacts
-
termsAgreed
public boolean termsAgreed()Returns the value of thetermsAgreedrecord component.- Returns:
- the value of the
termsAgreedrecord component
-
eabPolicyCommitment
Returns the value of theeabPolicyCommitmentrecord component.- Returns:
- the value of the
eabPolicyCommitmentrecord component
-
createdAt
-
updatedAt
-
commitment
Returns the value of thecommitmentrecord component.- Returns:
- the value of the
commitmentrecord component
-
keyHistory
Returns the value of thekeyHistoryrecord component.- Returns:
- the value of the
keyHistoryrecord component
-