@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$provider = require __DIR__ . '/provider.php'; |
|
3 | +$provider = require __DIR__.'/provider.php'; |
|
4 | 4 | |
5 | 5 | unset($_SESSION['token'], $_SESSION['state']); |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require __DIR__ . '/../vendor/autoload.php'; |
|
3 | +require __DIR__.'/../vendor/autoload.php'; |
|
4 | 4 | |
5 | 5 | use League\OAuth2\Client\Provider\Google; |
6 | 6 |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$provider = require __DIR__ . '/provider.php'; |
|
3 | +$provider = require __DIR__.'/provider.php'; |
|
4 | 4 | |
5 | 5 | if (!empty($_GET['error'])) { |
6 | 6 | |
7 | 7 | // Got an error, probably user denied access |
8 | - exit('Got error: ' . htmlspecialchars($_GET['error'], ENT_QUOTES, 'UTF-8')); |
|
8 | + exit('Got error: '.htmlspecialchars($_GET['error'], ENT_QUOTES, 'UTF-8')); |
|
9 | 9 | |
10 | 10 | } elseif (empty($_GET['code'])) { |
11 | 11 | |
12 | 12 | // If we don't have an authorization code then get one |
13 | 13 | $authUrl = $provider->getAuthorizationUrl(); |
14 | 14 | $_SESSION['oauth2state'] = $provider->getState(); |
15 | - header('Location: ' . $authUrl); |
|
15 | + header('Location: '.$authUrl); |
|
16 | 16 | exit; |
17 | 17 | |
18 | 18 | } elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$provider = require __DIR__ . '/provider.php'; |
|
3 | +$provider = require __DIR__.'/provider.php'; |
|
4 | 4 | |
5 | 5 | if (isset($_GET['logout']) && $_GET['logout'] = 1) { |
6 | 6 | unset($_SESSION['token']); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | printf('Hello %s!<br/>', $userDetails->getFirstname()); |
24 | 24 | } catch (Exception $e) { |
25 | 25 | // Failed to get user details |
26 | - exit('Something went wrong: ' . $e->getMessage()); |
|
26 | + exit('Something went wrong: '.$e->getMessage()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | // Use this to interact with an API on the users behalf |
@@ -177,7 +177,7 @@ |
||
177 | 177 | return true; |
178 | 178 | } |
179 | 179 | |
180 | - if ($this->isDomainExpression($reference) && @preg_match('/' . $reference . '/', $hostedDomain)) { |
|
180 | + if ($this->isDomainExpression($reference) && @preg_match('/'.$reference.'/', $hostedDomain)) { |
|
181 | 181 | // Hosted domain is correct. |
182 | 182 | return true; |
183 | 183 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * @var string If set, this will be sent to google as the "hd" parameter. |
23 | 23 | * Extra-feature: Also accept a comma-separated list of domains or domain regular expressions. |
24 | 24 | * In that case, Google connection screen is not bound to a specific hosted domain |
25 | - * because no "hd" parameter is sent to Google, but domain matching is still done by this library. |
|
25 | + * because no "hd" parameter is sent to Google, but domain matching is still done by this library. |
|
26 | 26 | * @link https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters |
27 | 27 | */ |
28 | 28 | protected $hostedDomain; |