1 | <?php namespace Bogstag\OAuth2\Client\Provider; |
||
12 | class Trakt extends AbstractExtendedProvider |
||
13 | { |
||
14 | use BearerAuthorizationTrait; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $baseUrlApi = 'https://api.trakt.tv'; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $baseUrl = 'https://trakt.tv'; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | protected $traktApiVersion = 2; |
||
30 | |||
31 | /** |
||
32 | * Get authorization url to begin OAuth flow |
||
33 | * As noted in api docs you should use the normal url not the api url. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getBaseAuthorizationUrl() |
||
41 | |||
42 | /** |
||
43 | * @inheritDoc |
||
44 | */ |
||
45 | public function getBaseAccessTokenUrl(array $params) |
||
49 | |||
50 | /** |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | public function getBaseRevokeAccessTokenUrl() |
||
57 | |||
58 | /** |
||
59 | * @inheritDoc |
||
60 | */ |
||
61 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
||
65 | 9 | ||
66 | /** |
||
67 | 3 | * @inheritDoc |
|
68 | 3 | */ |
|
69 | 3 | public function getHeaders($token = null) |
|
82 | |||
83 | /** |
||
84 | * @inheritDoc |
||
85 | */ |
||
86 | protected function getDefaultScopes() |
||
90 | 3 | ||
91 | 3 | /** |
|
92 | 3 | * @inheritDoc |
|
93 | */ |
||
94 | 2 | protected function checkResponse(ResponseInterface $response, $data) |
|
104 | |||
105 | /** |
||
106 | * @inheritDoc |
||
107 | */ |
||
108 | protected function createResourceOwner(array $response, AccessToken $token) |
||
112 | } |
||
113 |