1 | <?php |
||
17 | class HttpBasicAuthenticationPlugin extends AbstractAuthenticationPlugin |
||
18 | { |
||
19 | /** The authentication realm, usually presented to the user in a |
||
20 | username/password dialog box. */ |
||
21 | private $realm = "Authentication Required"; |
||
22 | |||
23 | /** |
||
24 | * Create a new HTTP/Basic Authentication plugin. |
||
25 | * |
||
26 | * @param array $options An associative array of options. Supports AuthMechanism and realm options. |
||
27 | */ |
||
28 | 1 | public function __construct($options) |
|
36 | |||
37 | /** |
||
38 | * Invoked directly after the router decides which handler will be used. |
||
39 | * @param AbstractHandler $handler The handler selected by the router. |
||
40 | */ |
||
41 | 1 | public function afterHandlerSelected(AbstractHandler $handler) |
|
50 | |||
51 | /** |
||
52 | * Extract credentials from the request, PHP's PHP_AUTH_(USER|PW) server variables in this case. |
||
53 | * |
||
54 | * @return mixed An array of credentials; A username and password pair, or false if credentials aren't available |
||
55 | */ |
||
56 | 1 | public function getCredentials() |
|
63 | } |
||
64 |
If you suppress an error, we recommend checking for the error condition explicitly: