1 | <?php |
||
5 | class BearerAuth implements AuthValue |
||
6 | { |
||
7 | /** |
||
8 | * The application ID (also known as API key). |
||
9 | * |
||
10 | * @see https://developer.justgiving.com/apidocs/documentation#AppId |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $appId; |
||
14 | |||
15 | /** |
||
16 | * The bearer token obtained via oAuth. |
||
17 | * |
||
18 | * @see https://justgivingdeveloper.zendesk.com/hc/en-us/articles/207071499-Getting-a-bearer-token |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $token; |
||
22 | |||
23 | /** |
||
24 | * The secret key provided by JustGiving (this currently has to be requested manually). |
||
25 | * |
||
26 | * @see https://justgivingdeveloper.zendesk.com/hc/en-us/articles/115002238925-How-do-I-get-a-secret-key- |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $secretKey; |
||
30 | |||
31 | public function __construct($appId, $secretKey, $token) |
||
37 | |||
38 | /** |
||
39 | * Get the authentication headers. |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | 1 | public function getHeaders() |
|
51 | } |
||
52 |