| 1 | <?php |
||
| 5 | class AppAuth implements AuthValue |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The application ID. |
||
| 9 | * |
||
| 10 | * @see https://developer.justgiving.com/apidocs/documentation#AppId |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $appId; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * The secret key associated with the App ID. Required if JustGiving have set up a secret key for the app. |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $secretKey; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * AppAuth constructor. |
||
| 24 | * |
||
| 25 | * @param string $appId |
||
| 26 | * @param string $secretKey |
||
| 27 | */ |
||
| 28 | public function __construct($appId, $secretKey = null) |
||
| 29 | { |
||
| 30 | $this->appId = $appId; |
||
| 31 | $this->secretKey = $secretKey; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get the authentication headers. |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | 2 | public function getHeaders() |
|
| 49 | } |
||
| 50 |