Detailed Description
The typed answer to {.
- See also
- DidClient::redeem()}, built from the body the cloud's redeem endpoint sent with a 200 or a 503.
The two time fields describe the redemption rather than the identifier. {
- See also
- RedeemResult::$verifiedAt} is when the verify endpoint checked the context and sealed the result, and {
- RedeemResult::$secondsSinceVerified} is how long ago that was by the service's clock, in whole seconds. Both are present on the redeemed and expired outcomes and null otherwise.
Public Member Functions | |
| __construct (ContextOutcome $context, string $rawContext, SignatureOutcome $signature, ?array $factors, ?DateTimeImmutable $verifiedAt, ?int $secondsSinceVerified, int $statusCode, string $raw) | |
| toArray () | |
The result in the cloud's own shape (signature, context, factors when present, verifiedAt, secondsSinceVerified), for a server that relays a redemption to a page as JSON. | |
Static Public Member Functions | |
| static | fromResponse (int $statusCode, string $body) |
| Builds the result from a redeem response. | |
Data Fields | |
| const | VERIFIED_AT_FORMAT = 'Y-m-d\TH:i:s\Z' |
The format the cloud writes verifiedAt in, ISO 8601 UTC to the second. | |
| readonly ContextOutcome | $context |
| The creator context verdict. | |
| readonly string | $rawContext |
The context string exactly as the cloud sent it, so a value this build maps to {. | |
| readonly SignatureOutcome | $signature |
| The signature outcome, {. | |
| readonly array | $factors |
| readonly DateTimeImmutable | $verifiedAt |
| When the context was verified and sealed, UTC, or null. | |
| readonly int | $secondsSinceVerified |
| Whole seconds between sealing and redemption, or null. | |
| readonly int | $statusCode |
| The HTTP status, 200 or 503. | |
| readonly string | $raw |
| The response body exactly as received. | |
Constructor & Destructor Documentation
◆ __construct()
| fiftyone\pipeline\did\RedeemResult::__construct | ( | ContextOutcome | $context, |
| string | $rawContext, | ||
| SignatureOutcome | $signature, | ||
| ?array | $factors, | ||
| ?DateTimeImmutable | $verifiedAt, | ||
| ?int | $secondsSinceVerified, | ||
| int | $statusCode, | ||
| string | $raw ) |
- Parameters
-
array<string,FactorOutcome>|null $factors
Member Function Documentation
◆ fromResponse()
|
static |
Builds the result from a redeem response.
A body that is not a JSON object, or one without a context, reads as {
- See also
- ContextOutcome::Unreadable}, so nothing unexpected passes as a verdict.
◆ toArray()
| fiftyone\pipeline\did\RedeemResult::toArray | ( | ) |
The result in the cloud's own shape (signature, context, factors when present, verifiedAt, secondsSinceVerified), for a server that relays a redemption to a page as JSON.
Fields the cloud did not send are left out, as the cloud leaves them out.
- Returns
- array<string, mixed>
Field Documentation
◆ $rawContext
| readonly string fiftyone\pipeline\did\RedeemResult::$rawContext |
The context string exactly as the cloud sent it, so a value this build maps to {.
- See also
- ContextOutcome::Unreadable} because it is not known is still visible. Empty when the field was absent.
◆ $signature
| readonly SignatureOutcome fiftyone\pipeline\did\RedeemResult::$signature |
The signature outcome, {.
- See also
- SignatureOutcome::Unknown} when absent.
