AXIAM PHP SDK

GeneratedCertificate
in package
implements JsonSerializable

FinalYes

Response returned when a tenant certificate is generated. Includes the private key PEM, returned **once** and never stored.

Table of Contents

Interfaces

JsonSerializable

Properties

$certType  : CertificateType
$chainPem  : string|null
$createdAt  : string
$fingerprint  : string
$id  : string
$issuerCaId  : string
$keyAlgorithm  : KeyAlgorithm
$metadata  : mixed
$notAfter  : string
$notBefore  : string
$privateKeyPem  : Sensitive
$publicCertPem  : string
$status  : CertificateStatus
$subject  : string
$tenantId  : string

Methods

__construct()  : mixed
Constructs a GeneratedCertificate.
fromArray()  : self
Rebuilds a GeneratedCertificate from one decoded JSON object.
jsonSerialize()  : array<string, mixed>
Renders this object for `json_encode()`.
toArray()  : array<string, mixed>
Renders this object back to its wire form.

Properties

Methods

__construct()

Constructs a GeneratedCertificate.

public __construct(CertificateType $certType, string $createdAt, string $fingerprint, string $id, string $issuerCaId, KeyAlgorithm $keyAlgorithm, mixed $metadata, string $notAfter, string $notBefore, string $publicCertPem, CertificateStatus $status, string $subject, string $tenantId, Sensitive $privateKeyPem[, string|null $chainPem = null ]) : mixed
Parameters
$certType : CertificateType

the server's cert_type field

$createdAt : string

the server's created_at field

$fingerprint : string

SHA-256 fingerprint of the certificate.

$id : string

the server's id field

$issuerCaId : string

The CA certificate that signed this certificate.

$keyAlgorithm : KeyAlgorithm

the server's key_algorithm field

$metadata : mixed

Arbitrary key-value metadata (e.g., device serial, user ID binding).

$notAfter : string

Validity end.

$notBefore : string

Validity start.

$publicCertPem : string

PEM-encoded public certificate.

$status : CertificateStatus

the server's status field

$subject : string

The certificate subject (e.g., CN=device-001).

$tenantId : string

The tenant this certificate belongs to.

$privateKeyPem : Sensitive

PEM-encoded private key — returned only on generation.

$chainPem : string|null = null

The issuing chain, concatenated PEM, nearest issuer first. Present only when the signer returned one — which is the vault_pki case, where the root's certificate exists nowhere a client could fetch it from. For a CA AXIAM signed with itself the chain is the CA certificate, which GET .../ca-certificates/{id} already serves, so the field is omitted rather than restating it. (optional)

fromArray()

Rebuilds a GeneratedCertificate from one decoded JSON object.

public static fromArray(array<string, mixed> $data) : self
Parameters
$data : array<string, mixed>

The raw wire object.

Return values
self

jsonSerialize()

Renders this object for `json_encode()`.

public jsonSerialize() : array<string, mixed>

Any Sensitive it carries stays WRAPPED here, so a log line or a json_encode($model) in application code prints [SENSITIVE]. The one place a secret is revealed is ManagementTransport, on the way to the wire and nowhere else (§27.5).

Return values
array<string, mixed>

toArray()

Renders this object back to its wire form.

public toArray() : array<string, mixed>

§27.4 rule 5: a null property is OMITTED, not emitted as null. On a sparse update those two say opposite things — "leave this alone" versus "set this to nothing" — and only omission means the first.

Return values
array<string, mixed>
On this page

Search results