Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function check(OAuth2Token $token, OAuth2 $configuration): void |
||
25 | { |
||
26 | if (null === $configuration->getResourceOwnerId()) { |
||
27 | return; |
||
28 | } |
||
29 | |||
30 | if ($configuration->getResourceOwnerId() !== $token->getResourceOwnerId()) { |
||
31 | throw new \Exception('Resource owner not authorized.'); |
||
32 | } |
||
33 | } |
||
34 | } |
||
35 |