Debian Codegraph @

lib/3rdParty/composer/web-token/jwt-library/KeyManagement/Analyzer/NoneAnalyzer.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Jose\Component\KeyManagement\Analyzer;
6
7 use Jose\Component\Core\JWK;
8
9 final class NoneAnalyzer implements KeyAnalyzer
10 {
11 public function analyze(JWK $jwk, MessageBag $bag): void
12 {
13 if ($jwk->get('kty') !== 'none') {
14 return;
15 }
16
17 $bag->add(
18 Message::high(
19 'This key is a meant to be used with the algorithm "none". This algorithm is not secured and should be used with care.'
20 )
21 );
22 }
23 }