Total Complexity | 4 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class PasswordContainerProvider implements UserProviderInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $password; |
||
26 | |||
27 | /** |
||
28 | * PasswordContainerProvider constructor. |
||
29 | */ |
||
30 | public function __construct(ParameterBagInterface $parameterBag) |
||
33 | } |
||
34 | |||
35 | /** * |
||
36 | * |
||
37 | * @return UserInterface |
||
38 | */ |
||
39 | public function refreshUser(UserInterface $user) |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Loads the user for the given username. |
||
46 | * |
||
47 | * This method must throw UsernameNotFoundException if the user is not |
||
48 | * found. |
||
49 | * |
||
50 | * @param string $username The username |
||
51 | * |
||
52 | * @throws UsernameNotFoundException if the user is not found |
||
53 | * |
||
54 | * @return UserInterface |
||
55 | */ |
||
56 | public function loadUserByUsername($username) |
||
57 | { |
||
58 | return new PasswordContainer($this->password); |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * Whether this provider supports the given user class. |
||
63 | * |
||
64 | * @param string $class |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function supportsClass($class) |
||
71 | } |
||
72 | } |
||
73 |