string(); parent::__construct( $clientDataJSON ); $this->attestationObject = $attestationObject; $this->transports = $transports; } public static function hydrate( array $data ): AuthenticatorResponse { Assert::that( $data, 'AuthenticatorAttestationResponse hydration does not contain "%s".' ) ->keyExists( 'clientDataJSON' ) ->keyExists( 'attestationObject' ); return new self( BinaryString::from_ascii( $data['clientDataJSON'] ), BinaryString::from_ascii( $data['attestationObject'] ), $data['transports'] ?? [] ); } public function get_attestation_object(): BinaryString { return $this->attestationObject; } public function get_transports(): array { return $this->transports; } public function jsonSerialize(): array { return \ITSEC_Lib::recursively_json_serialize( get_object_vars( $this ) ); } }