1 | <?php |
||
7 | class Auth |
||
8 | { |
||
9 | const ENDPOINT = 'https://identitysso.betfair.com/api/'; |
||
10 | |||
11 | const SESSION_LENGTH = 4 * 60 * 60; // 4 hours |
||
12 | |||
13 | protected $httpClient; |
||
14 | |||
15 | public static $appKey = null; |
||
16 | |||
17 | public static $sessionToken = null; |
||
18 | |||
19 | public static $lastLogin = null; |
||
20 | |||
21 | public function __construct(HttpClient $httpClient = null) |
||
25 | |||
26 | public function init($appKey, $username, $password) |
||
35 | |||
36 | public function login($appKey, $username, $password) |
||
49 | |||
50 | public function keepAlive() |
||
59 | |||
60 | public function logout() |
||
71 | |||
72 | public function sessionRemaining() |
||
76 | } |
||
77 |