CoreFiles by mySites.guru
AuthenticatorAssertionResponse.php41 lines, 968 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
4e1e883d83ad6c4c6244723e80f922c6
sha1
57a848e556b46fe41c210bc98c01a33bf0be2793
sha256
26763e1ec92db860c432c02873cec63cdf309f9bc16f66867f51880bc0eb3996
<?php

declare(strict_types=1);

namespace Webauthn;

use ParagonIE\ConstantTime\Base64;

/**
 * @see https://www.w3.org/TR/webauthn/#authenticatorassertionresponse
 */
class AuthenticatorAssertionResponse extends AuthenticatorResponse
{
    public function __construct(
        CollectedClientData $clientDataJSON,
        private readonly AuthenticatorData $authenticatorData,
        private readonly string $signature,
        private readonly ?string $userHandle
    ) {
        parent::__construct($clientDataJSON);
    }

    public function getAuthenticatorData(): AuthenticatorData
    {
        return $this->authenticatorData;
    }

    public function getSignature(): string
    {
        return $this->signature;
    }

    public function getUserHandle(): ?string
    {
        if ($this->userHandle === null || $this->userHandle === '') {
            return $this->userHandle;
        }

        return Base64::decode($this->userHandle, true);
    }
}

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