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