Files
apache
wp-content
mu-plugins
plugins
activitypub
audioigniter
authldap
companion-auto-update
gitium
gp-premium
jetpack-protect
menu-icons
simple-local-avatars
smtp-mailer
two-factor
w3-total-cache
wp-piwik
wp-webauthn
blocks
css
js
languages
wp-webauthn-vendor
beberlei
brick
composer
fgrosse
league
nyholm
psr
ramsey
spomky-labs
symfony
thecodingmachine
web-auth
web-token
jwt-core
jwt-key-mgmt
.github
Analyzer
AlgorithmAnalyzer.php
ES256KeyAnalyzer.php
ES384KeyAnalyzer.php
ES512KeyAnalyzer.php
HS256KeyAnalyzer.php
HS384KeyAnalyzer.php
HS512KeyAnalyzer.php
KeyAnalyzer.php
KeyAnalyzerManager.php
KeyIdentifierAnalyzer.php
KeysetAnalyzer.php
KeysetAnalyzerManager.php
Message.php
MessageBag.php
MixedKeyTypes.php
MixedPublicAndPrivateKeys.php
NoneAnalyzer.php
OctAnalyzer.php
RsaAnalyzer.php
UsageAnalyzer.php
ZxcvbnKeyAnalyzer.php
KeyConverter
JKUFactory.php
JWKFactory.php
LICENSE
README.md
UrlKeySetFactory.php
X5UFactory.php
composer.json
jwt-signature
jwt-signature-algorithm-ecdsa
jwt-signature-algorithm-eddsa
jwt-signature-algorithm-rsa
autoload.php
LICENSE
readme.txt
wp-webauthn.php
wwa-admin-content.php
wwa-ajax.php
wwa-compatibility.php
wwa-functions.php
wwa-menus.php
wwa-profile-content.php
wwa-shortcodes.php
wwa-version.php
index.php
themes
upgrade-temp-backup
w3tc-config
index.php
.dbsetup
.gitignore
htaccess
php.ini

47 lines
945 B
PHP

<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2020 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Jose\Component\KeyManagement\Analyzer;
use Jose\Component\Core\JWK;
class KeyAnalyzerManager
{
/**
* @var KeyAnalyzer[]
*/
private $analyzers = [];
/**
* Adds a Key Analyzer to the manager.
*/
public function add(KeyAnalyzer $analyzer): void
{
$this->analyzers[] = $analyzer;
}
/**
* This method will analyze the JWK object using all analyzers.
* It returns a message bag that may contains messages.
*/
public function analyze(JWK $jwk): MessageBag
{
$bag = new MessageBag();
foreach ($this->analyzers as $analyzer) {
$analyzer->analyze($jwk, $bag);
}
return $bag;
}
}