Jose\Object\X5UJWKSet::getKeys PHP Method

getKeys() public method

public getKeys ( ) : Jose\Object\JWKInterface[]
return Jose\Object\JWKInterface[]
    public function getKeys()
    {
        $content = json_decode($this->getContent(), true);
        Assertion::isArray($content, 'Invalid content.');
        $jwkset = new JWKSet();
        foreach ($content as $kid => $cert) {
            $jwk = KeyConverter::loadKeyFromCertificate($cert);
            Assertion::notEmpty($jwk, 'Invalid content.');
            if (is_string($kid)) {
                $jwk['kid'] = $kid;
            }
            $jwkset->addKey(new JWK($jwk));
        }
        return $jwkset->getKeys();
    }
X5UJWKSet