1 | <?php namespace Arcanedev\Socialite\OAuth\Two; |
||
11 | class GithubProvider extends OAuthTwoProvider |
||
12 | { |
||
13 | /* ------------------------------------------------------------------------------------------------ |
||
14 | | Properties |
||
15 | | ------------------------------------------------------------------------------------------------ |
||
16 | */ |
||
17 | /** |
||
18 | * The scopes being requested. |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $scopes = ['user:email']; |
||
23 | |||
24 | /* ------------------------------------------------------------------------------------------------ |
||
25 | | Main Functions |
||
26 | | ------------------------------------------------------------------------------------------------ |
||
27 | */ |
||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | protected function getAuthUrl($state) |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | protected function getTokenUrl() |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | protected function getUserByToken($token) |
||
61 | |||
62 | /** |
||
63 | * Get the email for the given access token. |
||
64 | * |
||
65 | * @param string $token |
||
66 | * |
||
67 | * @return string|null |
||
68 | */ |
||
69 | protected function getEmailByToken($token) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | protected function mapUserToObject(array $user) |
||
104 | |||
105 | /** |
||
106 | * Get the default options for an HTTP request. |
||
107 | * |
||
108 | * @return array |
||
109 | */ |
||
110 | protected function getRequestOptions() |
||
118 | } |
||
119 |