CoreFiles by mySites.guru
EcdaaKeyIdTrustPath.php47 lines, 1,034 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
0d57aa97abd191127f6f129cb2f090d2
sha1
443288ff42f266d2409bf2affa803e351a372d29
sha256
9c90f489f95830e52c69b1c2d6939e289f126fc1f67e323704442109ea469c55
<?php

declare(strict_types=1);

namespace Webauthn\TrustPath;

use function array_key_exists;
use Webauthn\Exception\InvalidTrustPathException;

/**
 * @deprecated since 4.2.0 and will be removed in 5.0.0. The ECDAA Trust Anchor does no longer exist in Webauthn specification.
 */
final class EcdaaKeyIdTrustPath implements TrustPath
{
    public function __construct(
        private readonly string $ecdaaKeyId
    ) {
    }

    public function getEcdaaKeyId(): string
    {
        return $this->ecdaaKeyId;
    }

    /**
     * @return string[]
     */
    public function jsonSerialize(): array
    {
        return [
            'type' => self::class,
            'ecdaaKeyId' => $this->ecdaaKeyId,
        ];
    }

    /**
     * {@inheritdoc}
     */
    public static function createFromArray(array $data): static
    {
        array_key_exists('ecdaaKeyId', $data) || throw InvalidTrustPathException::create(
            'The trust path type is invalid'
        );

        return new self($data['ecdaaKeyId']);
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.