if (isset($data['error'
]) && \
is_string($data['error'
])) { throw AppException::
registrationFailed($appName,
$data['error'
]);
} $proof =
$data['proof'
] ?? '';
if (!\
is_string($proof)) { throw AppException::
registrationFailed($appName, 'The app server provided no proof'
);
} if (!
hash_equals($handshake->
fetchAppProof(),
trim($proof))) { throw AppException::
registrationFailed($appName, 'The app server provided an invalid proof'
);
} return $data;
} /**
* @return array<string, string>
*/
private function getConfirmationPayload(string
$id, string
$secretAccessKey, Context
$context): array
{