1 | <?php |
||
9 | class Auth extends Api |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $apiUrl = "https://user.humanapi.co"; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $apiVersion = 1; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $sessionTokenData; |
||
26 | |||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * @see https://docs.humanapi.co/docs/connect-backend |
||
31 | * |
||
32 | * @param array $sessionTokenData |
||
33 | * @param string $clientSecret |
||
34 | */ |
||
35 | public function __construct(array $sessionTokenData, $clientSecret) |
||
44 | |||
45 | /** |
||
46 | * Finish the auth flow and post to connect endpoint, and return response array |
||
47 | * containing accessToken and other data about the 'human' entity. |
||
48 | * |
||
49 | * @return array |
||
50 | */ |
||
51 | public function finish() |
||
63 | } |
||
64 |