1 | <?php |
||
11 | class Google extends AbstractProvider |
||
12 | { |
||
13 | use BearerAuthorizationTrait; |
||
14 | |||
15 | /** |
||
16 | * @var string If set, this will be sent to google as the "access_type" parameter. |
||
17 | * @link https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters |
||
18 | */ |
||
19 | protected $accessType; |
||
20 | |||
21 | /** |
||
22 | * @var string Comma-separated list of domains or domain regular expressions. |
||
23 | * If only one regular value is passed, it will be sent to google as the "hd" parameter. |
||
24 | * @link https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters |
||
25 | */ |
||
26 | protected $hostedDomain; |
||
27 | |||
28 | /** |
||
29 | * @var string If set, this will be sent to google as the "prompt" parameter. |
||
30 | * @link https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters |
||
31 | */ |
||
32 | protected $prompt; |
||
33 | |||
34 | /** |
||
35 | * @var array List of scopes that will be used for authentication. |
||
36 | * @link https://developers.google.com/identity/protocols/googlescopes |
||
37 | */ |
||
38 | protected $scopes = []; |
||
39 | |||
40 | public function getBaseAuthorizationUrl() |
||
44 | |||
45 | public function getBaseAccessTokenUrl(array $params) |
||
49 | |||
50 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
||
54 | |||
55 | protected function getAuthorizationParameters(array $options) |
||
86 | |||
87 | protected function getDefaultScopes() |
||
96 | |||
97 | protected function getScopeSeparator() |
||
101 | |||
102 | protected function checkResponse(ResponseInterface $response, $data) |
||
120 | |||
121 | protected function createResourceOwner(array $response, AccessToken $token) |
||
129 | |||
130 | protected function isDomainExpression($str) |
||
134 | |||
135 | protected function isHostedDomainMultiple() |
||
139 | |||
140 | /** |
||
141 | * @throws HostedDomainException If the domain does not match the configured domain. |
||
142 | */ |
||
143 | protected function assertMatchingDomains($hostedDomain) |
||
164 | |||
165 | /** |
||
166 | * @return bool Whether user-originating domain equals or matches $reference. |
||
167 | */ |
||
168 | protected function assertMatchingDomain($reference, $hostedDomain) |
||
185 | } |
||
186 |