1 | <?php namespace Bogstag\OAuth2\Client\Provider; |
||
13 | class Trakt extends AbstractProvider |
||
14 | { |
||
15 | use BearerAuthorizationTrait; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $baseUrlApi = 'https://api.trakt.tv'; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $baseUrl = 'https://trakt.tv'; |
||
26 | |||
27 | /** |
||
28 | * @var int |
||
29 | */ |
||
30 | protected $traktApiVersion = 2; |
||
31 | |||
32 | /** |
||
33 | * Get authorization url to begin OAuth flow |
||
34 | * As noted in api docs you should use the normal url not the api url. |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | 6 | public function getBaseAuthorizationUrl() |
|
42 | |||
43 | /** |
||
44 | * @inheritDoc |
||
45 | */ |
||
46 | 12 | public function getBaseAccessTokenUrl(array $params) |
|
50 | |||
51 | /** |
||
52 | * @inheritDoc |
||
53 | */ |
||
54 | 3 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
58 | |||
59 | /** |
||
60 | * @inheritDoc |
||
61 | */ |
||
62 | 9 | public function getHeaders($token = null) |
|
75 | |||
76 | /** |
||
77 | * @inheritDoc |
||
78 | */ |
||
79 | 6 | protected function getDefaultScopes() |
|
83 | |||
84 | /** |
||
85 | * @inheritDoc |
||
86 | */ |
||
87 | 9 | protected function checkResponse(ResponseInterface $response, $data) |
|
97 | |||
98 | /** |
||
99 | * @inheritDoc |
||
100 | */ |
||
101 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
105 | } |
||
106 |