Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class EuloginUserProvider implements EuloginUserProviderInterface |
||
19 | { |
||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | public function loadUserByResponse(ResponseInterface $response): CasUserInterface |
||
24 | { |
||
25 | /** @var \drupol\psrcas\Introspection\Contract\ServiceValidate $introspect */ |
||
26 | $introspect = Introspector::detect($response); |
||
27 | |||
28 | return new EuloginUser($introspect->getParsedResponse()['serviceResponse']['authenticationSuccess']); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function loadUserByUsername(string $username) |
||
35 | { |
||
36 | throw new UnsupportedUserException(sprintf('Username "%s" does not exist.', $username)); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function refreshUser(UserInterface $user) |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function supportsClass(string $class) |
||
59 |