Certificate
in package
implements
JsonSerializable
A tenant-level certificate for users, services, or IoT devices. Certificates are signed by the organization's CA. The private key is returned once on generation and never stored by AXIAM.
Table of Contents
Interfaces
- JsonSerializable
Properties
- $boundServiceAccountId : string|null
- $certType : CertificateType
- $createdAt : string
- $fingerprint : string
- $id : string
- $issuerCaId : string
- $keyAlgorithm : KeyAlgorithm
- $metadata : mixed
- $notAfter : string
- $notBefore : string
- $publicCertPem : string
- $status : CertificateStatus
- $subject : string
- $tenantId : string
Methods
- __construct() : mixed
- Constructs a Certificate.
- fromArray() : self
- Rebuilds a Certificate 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
$boundServiceAccountId read-only
public
string|null
$boundServiceAccountId
= null
$certType read-only
public
CertificateType
$certType
$createdAt read-only
public
string
$createdAt
$fingerprint read-only
public
string
$fingerprint
$id read-only
public
string
$id
$issuerCaId read-only
public
string
$issuerCaId
$keyAlgorithm read-only
public
KeyAlgorithm
$keyAlgorithm
$metadata read-only
public
mixed
$metadata
$notAfter read-only
public
string
$notAfter
$notBefore read-only
public
string
$notBefore
$publicCertPem read-only
public
string
$publicCertPem
$status read-only
public
CertificateStatus
$status
$subject read-only
public
string
$subject
$tenantId read-only
public
string
$tenantId
Methods
__construct()
Constructs a Certificate.
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[, string|null $boundServiceAccountId = null ]) : mixed
Parameters
- $certType : CertificateType
-
the server's
cert_typefield - $createdAt : string
-
the server's
created_atfield - $fingerprint : string
-
SHA-256 fingerprint of the certificate.
- $id : string
-
the server's
idfield - $issuerCaId : string
-
The CA certificate that signed this certificate.
- $keyAlgorithm : KeyAlgorithm
-
the server's
key_algorithmfield - $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
statusfield - $subject : string
-
The certificate subject (e.g.,
CN=device-001). - $tenantId : string
-
The tenant this certificate belongs to.
- $boundServiceAccountId : string|null = null
-
Resolved by the list projection only. The server resolves this for a whole page in one query, so it is populated by
listand isnullonget(CONTRACT.md §27.11 rule 4).nullthere means "this read does not carry it", not "there is nothing bound" — this SDK does not issue a second request to fill it in. (optional)
fromArray()
Rebuilds a Certificate from one decoded JSON object.
public
static fromArray(array<string, mixed> $data) : self
Parameters
- $data : array<string, mixed>
-
The raw wire object.
Return values
selfjsonSerialize()
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.