CoreFiles by mySites.guru
NoneAnalyzer.php23 lines, 519 bytes, from Joomla_5.2.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 5.2.0-alpha1
md5
93fa4868f6c5d613c0b9d4c3b990f898
sha1
c05f82858229c99a9e134d1992f317a241953380
sha256
3276046700b82bddc9320172e12b443587987e0d2b915e592026be7ec8d9b221
<?php

declare(strict_types=1);

namespace Jose\Component\KeyManagement\Analyzer;

use Jose\Component\Core\JWK;

final class NoneAnalyzer implements KeyAnalyzer
{
    public function analyze(JWK $jwk, MessageBag $bag): void
    {
        if ($jwk->get('kty') !== 'none') {
            return;
        }

        $bag->add(
            Message::high(
                'This key is a meant to be used with the algorithm "none". This algorithm is not secured and should be used with care.'
            )
        );
    }
}

The same content is in 136 releases, Joomla 5.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.