Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 53.85% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | 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 | /** |
||
25 | * Issuer constructor. |
||
26 | * |
||
27 | * @param IssuerMetadataInterface $metadata |
||
28 | * @param JWKSet $jwks |
||
29 | * @param JKUFactory|null $JKUFactory |
||
30 | */ |
||
31 | 2 | public function __construct( |
|
32 | IssuerMetadataInterface $metadata, |
||
33 | JWKSet $jwks, |
||
34 | ?JKUFactory $JKUFactory = null |
||
35 | ) { |
||
36 | 2 | $this->metadata = $metadata; |
|
37 | 2 | $this->jwks = $jwks; |
|
38 | 2 | $this->JKUFactory = $JKUFactory ?: new JKUFactory( |
|
39 | Psr18ClientDiscovery::find(), |
||
40 | Psr17FactoryDiscovery::findRequestFactory() |
||
41 | ); |
||
42 | 2 | } |
|
43 | |||
44 | 2 | public function getMetadata(): IssuerMetadataInterface |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return JWKSet |
||
51 | */ |
||
52 | public function getJwks(): JWKSet |
||
53 | { |
||
54 | return $this->jwks; |
||
55 | } |
||
56 | |||
57 | public function updateJwks(): void |
||
60 | } |
||
61 | } |
||
62 |