1 | <?php |
||
7 | abstract class RemoteUser implements UserInterface |
||
8 | { |
||
9 | protected $username; |
||
10 | protected $password; |
||
11 | /** |
||
12 | * Most likely to be set at creation time, holds the data coming from the remote system. |
||
13 | * |
||
14 | * NB: the whole profile gets serialized in the session, as part of the Sf auth token. You should probably make sure |
||
15 | * that it does not include a huge amount of useless data, by implementing the Serializable interface... |
||
16 | * |
||
17 | * @var mixed |
||
18 | */ |
||
19 | protected $profile; |
||
20 | |||
21 | abstract public function getRoles(); |
||
22 | |||
23 | public function getProfile() |
||
27 | |||
28 | /** |
||
29 | * Returns the password used to authenticate the user. |
||
30 | * @return string The password |
||
31 | */ |
||
32 | public function getPassword() |
||
36 | |||
37 | /** |
||
38 | * Returns the salt that was originally used to encode the password. |
||
39 | * |
||
40 | * This can return null if the password was not encoded using a salt. |
||
41 | * |
||
42 | * @return string|null The salt |
||
43 | */ |
||
44 | public function getSalt() |
||
48 | |||
49 | /** |
||
50 | * Returns the username used to authenticate the user. |
||
51 | * |
||
52 | * @return string The username |
||
53 | */ |
||
54 | public function getUsername() |
||
58 | |||
59 | |||
60 | /** |
||
61 | * Removes sensitive data from the user. |
||
62 | * |
||
63 | * This is important if, at any given point, sensitive information like |
||
64 | * the plain-text password is stored on this object. |
||
65 | */ |
||
66 | public function eraseCredentials() |
||
69 | } |