| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function getAction() |
||
| 29 | { |
||
| 30 | $keyStorage = $this->get('oauth2.storage.public_key'); |
||
| 31 | $pubKey = new RSA(); |
||
| 32 | $pubKey->loadKey($keyStorage->getPublicKey()); |
||
| 33 | $publicKey = \JOSE_JWK::encode($pubKey); |
||
| 34 | |||
| 35 | $publicKey->components['kid'] = 'pub'; |
||
| 36 | |||
| 37 | $jwks = new \JOSE_JWKSet(array($publicKey)); |
||
| 38 | |||
| 39 | return new JsonResponse(json_decode($jwks->toString())); |
||
| 40 | } |
||
| 42 |