1 | <?php |
||
9 | abstract class GrantTypeBase implements GrantTypeInterface |
||
10 | { |
||
11 | /** @var ClientInterface The token endpoint client */ |
||
12 | protected $client; |
||
13 | |||
14 | /** @var Collection Configuration settings */ |
||
15 | protected $config; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $grantType = ''; |
||
19 | |||
20 | /** |
||
21 | * @param ClientInterface $client |
||
22 | * @param array $config |
||
23 | */ |
||
24 | 10 | public function __construct(ClientInterface $client, array $config = []) |
|
29 | |||
30 | /** |
||
31 | * Get default configuration items. |
||
32 | * |
||
33 | * @return array |
||
34 | */ |
||
35 | 10 | protected function getDefaults() |
|
44 | |||
45 | /** |
||
46 | * Get required configuration items. |
||
47 | * |
||
48 | * @return string[] |
||
49 | */ |
||
50 | 10 | protected function getRequired() |
|
54 | |||
55 | /** |
||
56 | * Get additional options, if any. |
||
57 | * |
||
58 | * @return array|null |
||
59 | */ |
||
60 | 4 | protected function getAdditionalOptions() |
|
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | 5 | public function getToken() |
|
94 | } |
||
95 |