| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function getKeys() |
||
| 27 | { |
||
| 28 | $content = json_decode($this->getContent(), true); |
||
| 29 | Assertion::isArray($content, 'Invalid content.'); |
||
| 30 | $jwkset = new JWKSet(); |
||
| 31 | foreach ($content as $kid => $cert) { |
||
| 32 | $jwk = KeyConverter::loadKeyFromCertificate($cert); |
||
| 33 | Assertion::notEmpty($jwk, 'Invalid content.'); |
||
| 34 | if (is_string($kid)) { |
||
| 35 | $jwk['kid'] = $kid; |
||
| 36 | } |
||
| 37 | $jwkset->addKey(new JWK($jwk)); |
||
| 38 | } |
||
| 39 | |||
| 40 | return $jwkset->getKeys(); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |