1 | <?php |
||
11 | class UserProviderAdapter implements UserManagerInterface |
||
12 | { |
||
13 | /** @var \Symfony\Component\Security\Core\User\UserProviderInterface */ |
||
14 | protected $userProvider; |
||
15 | |||
16 | |||
17 | |||
18 | function __construct(UserProviderInterface $userProvider) |
||
22 | |||
23 | |||
24 | /** |
||
25 | * @param SamlSpInfo $samlInfo |
||
26 | * @return UserInterface |
||
27 | * @throws UsernameNotFoundException if the user is not found |
||
28 | */ |
||
29 | public function loadUserBySamlInfo(SamlSpInfo $samlInfo) |
||
37 | |||
38 | /** |
||
39 | * @param SamlSpInfo $samlInfo |
||
40 | * @throws \Symfony\Component\Security\Core\Exception\UsernameNotFoundException if the user could not created |
||
41 | * @return \Symfony\Component\Security\Core\User\UserInterface |
||
42 | */ |
||
43 | public function createUserFromSamlInfo(SamlSpInfo $samlInfo) |
||
51 | |||
52 | /** |
||
53 | * Loads the user for the given username. |
||
54 | * |
||
55 | * This method must throw UsernameNotFoundException if the user is not |
||
56 | * found. |
||
57 | * |
||
58 | * @param string $username The username |
||
59 | * |
||
60 | * @return UserInterface |
||
61 | * |
||
62 | * @see UsernameNotFoundException |
||
63 | * |
||
64 | * @throws UsernameNotFoundException if the user is not found |
||
65 | * |
||
66 | */ |
||
67 | public function loadUserByUsername($username) |
||
71 | |||
72 | /** |
||
73 | * Refreshes the user for the account interface. |
||
74 | * |
||
75 | * It is up to the implementation to decide if the user data should be |
||
76 | * totally reloaded (e.g. from the database), or if the UserInterface |
||
77 | * object can just be merged into some internal array of users / identity |
||
78 | * map. |
||
79 | * @param UserInterface $user |
||
80 | * |
||
81 | * @return UserInterface |
||
82 | * |
||
83 | * @throws UnsupportedUserException if the account is not supported |
||
84 | */ |
||
85 | public function refreshUser(UserInterface $user) |
||
89 | |||
90 | /** |
||
91 | * Whether this provider supports the given user class |
||
92 | * |
||
93 | * @param string $class |
||
94 | * |
||
95 | * @return Boolean |
||
96 | */ |
||
97 | public function supportsClass($class) |
||
101 | } |
||
102 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.