1 | <?php |
||
13 | final class Matching implements Authentication |
||
14 | { |
||
15 | /** |
||
16 | * @var Authentication |
||
17 | */ |
||
18 | private $authentication; |
||
19 | |||
20 | /** |
||
21 | * @var callable |
||
22 | */ |
||
23 | private $matcher; |
||
24 | |||
25 | /** |
||
26 | * @param Authentication $authentication |
||
27 | * @param callable|null $matcher |
||
28 | */ |
||
29 | 9 | public function __construct(Authentication $authentication, callable $matcher = null) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function authenticate(RequestInterface $request) |
||
52 | |||
53 | /** |
||
54 | * Creates a matching authentication for an URL. |
||
55 | * |
||
56 | 1 | * @param Authentication $authentication |
|
57 | * @param string $url |
||
58 | 1 | * |
|
59 | 1 | * @return self |
|
60 | */ |
||
61 | public static function createUrlMatcher(Authentication $authentication, $url) |
||
69 | } |
||
70 |