protected function checkKeyAlgorithm(JWKInterface $key, $algorithm) { if (!$key->has('alg')) { return; } Assertion::eq($key->get('alg'), $algorithm, sprintf('Key is only allowed for algorithm "%s".', $key->get('alg'))); }