getPublicKeyCredentialDescriptor(), JSON_THROW_ON_ERROR); } public static function create(null|string $id, string $type, string $rawId, AuthenticatorResponse $response): self { return new self($id, $type, $rawId, $response); } /** * @deprecated since 4.7.0. Please use the property directly. * @infection-ignore-all */ public function getRawId(): string { return $this->rawId; } /** * @deprecated since 4.7.0. Please use the property directly. * @infection-ignore-all */ public function getResponse(): AuthenticatorResponse { return $this->response; } /** * @param string[] $transport */ public function getPublicKeyCredentialDescriptor(null|array $transport = null): PublicKeyCredentialDescriptor { if ($transport !== null) { trigger_deprecation( 'web-auth/webauthn-lib', '4.8.0', 'The parameter "$transport" is deprecated and will be removed in 5.0.0.' ); @trigger_error( sprintf( 'The $transport argument of %s() is deprecated since 4.8.0 and will be removed in 5.0.0.', __METHOD__ ), E_USER_DEPRECATED ); } $transport ??= $this->response instanceof AuthenticatorAttestationResponse ? $this->response->transports : []; return PublicKeyCredentialDescriptor::create($this->type, $this->rawId, $transport); } }