| 1 | <?php |
||
| 18 | abstract class AbstractAuth implements Adapter |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Holds the authentication realm. |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $realm = null; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Holds the base URL. |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $base_url = '/'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Holds the auth token. |
||
| 35 | * @var mixed |
||
| 36 | */ |
||
| 37 | protected $token; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Holds the user provided username. |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | protected $username; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @{@inheritdoc} |
||
| 47 | */ |
||
| 48 | public function getToken(array $auth_data) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Sets the Auth token |
||
| 59 | * |
||
| 60 | * @return mixed $token An auth token, can be a closure or a boolean. |
||
| 61 | */ |
||
| 62 | public function setToken($token) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Returns the user provided username. |
||
| 69 | * |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getUsername() |
||
| 76 | |||
| 77 | } |
||
| 78 |