Jose\Behaviour\HasKeyChecker::checkKeyUsage PHP Method

checkKeyUsage() protected method

protected checkKeyUsage ( Jose\Object\JWKInterface $key, string $usage ) : boolean
$key Jose\Object\JWKInterface
$usage string
return boolean
    protected function checkKeyUsage(JWKInterface $key, $usage)
    {
        if ($key->has('use')) {
            return $this->checkUsage($key, $usage);
        }
        if ($key->has('key_ops')) {
            return $this->checkOperation($key, $usage);
        }
        return true;
    }