1 | <?php |
||
8 | class ApiAuthenticationChain |
||
9 | { |
||
10 | protected $authenticationMethods; |
||
11 | |||
12 | public function __construct() |
||
16 | |||
17 | /** |
||
18 | * Finds the authentication handler that match with given token type. |
||
19 | * |
||
20 | * @param $tokenType |
||
21 | * |
||
22 | * @throws UnknownTokenTypeException |
||
23 | * |
||
24 | * @return mixed |
||
25 | */ |
||
26 | public function resolve($tokenType) |
||
34 | |||
35 | /** |
||
36 | * Adds an authentication method. |
||
37 | * |
||
38 | * @param APIAuthenticationMethodInterface $authenticationMethod |
||
39 | */ |
||
40 | public function addAuthenticationMethod(APIAuthenticationMethodInterface $authenticationMethod) |
||
44 | |||
45 | /** |
||
46 | * get authenticaton methods. |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | public function getAuthenticationMethods() |
||
54 | |||
55 | /** |
||
56 | * Get all available authentication methods. |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | public function getAuthenticationMethodsTypes() |
||
69 | |||
70 | /** |
||
71 | * @param string $alias |
||
72 | * |
||
73 | * @return APIAuthenticationMethodInterface |
||
74 | */ |
||
75 | public function getAuthenticationMethod($alias) |
||
79 | } |
||
80 |