| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class Issuer implements IssuerInterface |
||
| 14 | { |
||
| 15 | /** @var IssuerMetadataInterface */ |
||
| 16 | private $metadata; |
||
| 17 | |||
| 18 | /** @var JWKSet */ |
||
| 19 | private $jwks; |
||
| 20 | |||
| 21 | /** @var JKUFactory */ |
||
| 22 | private $JKUFactory; |
||
| 23 | |||
| 24 | 4 | public function __construct( |
|
| 25 | IssuerMetadataInterface $metadata, |
||
| 26 | JWKSet $jwks, |
||
| 27 | ?JKUFactory $JKUFactory = null |
||
| 28 | ) { |
||
| 29 | 4 | $this->metadata = $metadata; |
|
| 30 | 4 | $this->jwks = $jwks; |
|
| 31 | 4 | $this->JKUFactory = $JKUFactory ?: new JKUFactory( |
|
| 32 | 1 | Psr18ClientDiscovery::find(), |
|
| 33 | 1 | Psr17FactoryDiscovery::findRequestFactory() |
|
| 34 | ); |
||
| 35 | 4 | } |
|
| 36 | |||
| 37 | 3 | public function getMetadata(): IssuerMetadataInterface |
|
| 38 | { |
||
| 39 | 3 | return $this->metadata; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return JWKSet |
||
| 44 | */ |
||
| 45 | 2 | public function getJwks(): JWKSet |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | public function updateJwks(): void |
|
| 53 | 1 | } |
|
| 54 | } |
||
| 55 |