1 | <?php namespace Arcanedev\Socialite\OAuth\Two; |
||
12 | class GoogleProvider extends OAuthTwoProvider |
||
13 | { |
||
14 | /* ------------------------------------------------------------------------------------------------ |
||
15 | | Properties |
||
16 | | ------------------------------------------------------------------------------------------------ |
||
17 | */ |
||
18 | /** |
||
19 | * The separating character for the requested scopes. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $scopeSeparator = ' '; |
||
24 | |||
25 | /** |
||
26 | * The scopes being requested. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $scopes = ['openid', 'profile', 'email']; |
||
31 | |||
32 | /* ------------------------------------------------------------------------------------------------ |
||
33 | | Getters & Setters |
||
34 | | ------------------------------------------------------------------------------------------------ |
||
35 | */ |
||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | protected function getAuthUrl($state) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | protected function getTokenUrl() |
||
51 | |||
52 | /** |
||
53 | * Get the access token for the given code. |
||
54 | * |
||
55 | * @param string $code |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getAccessToken($code) |
||
69 | |||
70 | /** |
||
71 | * Get the POST fields for the token request. |
||
72 | * |
||
73 | * @param string $code |
||
74 | * |
||
75 | * @return array |
||
76 | */ |
||
77 | protected function getTokenFields($code) |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | protected function getUserByToken($token) |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | protected function mapUserToObject(array $user) |
||
115 | } |
||
116 |