equal
deleted
inserted
replaced
|
1 <?php |
|
2 /** |
|
3 * Authentication provider interface |
|
4 * |
|
5 * @package Requests\Authentication |
|
6 */ |
|
7 |
|
8 namespace WpOrg\Requests; |
|
9 |
|
10 use WpOrg\Requests\Hooks; |
|
11 |
|
12 /** |
|
13 * Authentication provider interface |
|
14 * |
|
15 * Implement this interface to act as an authentication provider. |
|
16 * |
|
17 * Parameters should be passed via the constructor where possible, as this |
|
18 * makes it much easier for users to use your provider. |
|
19 * |
|
20 * @see \WpOrg\Requests\Hooks |
|
21 * |
|
22 * @package Requests\Authentication |
|
23 */ |
|
24 interface Auth { |
|
25 /** |
|
26 * Register hooks as needed |
|
27 * |
|
28 * This method is called in {@see \WpOrg\Requests\Requests::request()} when the user |
|
29 * has set an instance as the 'auth' option. Use this callback to register all the |
|
30 * hooks you'll need. |
|
31 * |
|
32 * @see \WpOrg\Requests\Hooks::register() |
|
33 * @param \WpOrg\Requests\Hooks $hooks Hook system |
|
34 */ |
|
35 public function register(Hooks $hooks); |
|
36 } |