]> Raphaël G. Git Repositories - airbundle/commitdiff
Use google client id and secret env variables
authorRaphaël Gertz <git@rapsys.eu>
Fri, 8 Mar 2024 16:02:10 +0000 (17:02 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Fri, 8 Mar 2024 16:02:10 +0000 (17:02 +0100)
Command/Calendar2Command.php
Controller/UserController.php
Resources/config/packages/rapsysair.yaml

index c0a739fccdd02d85e52259e8967ea6bd60087fff..ea218e3bad420ac782b45f8fe1b5cfc97620bebf 100644 (file)
@@ -69,8 +69,8 @@ class Calendar2Command extends Command {
                $this->client = new Client(
                        [
                                'application_name' => $_ENV['RAPSYSAIR_GOOGLE_PROJECT'],
                $this->client = new Client(
                        [
                                'application_name' => $_ENV['RAPSYSAIR_GOOGLE_PROJECT'],
-                               'client_id' => $_ENV['RAPSYSAIR_GOOGLE_CLIENT'],
-                               'client_secret' => $_ENV['RAPSYSAIR_GOOGLE_SECRET'],
+                               'client_id' => $_ENV['GOOGLE_CLIENT_ID'],
+                               'client_secret' => $_ENV['GOOGLE_CLIENT_SECRET'],
                                'redirect_uri' => $this->router->generate('rapsysair_google_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
                                'scopes' => $this->scopes,
                                'access_type' => 'offline',
                                'redirect_uri' => $this->router->generate('rapsysair_google_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
                                'scopes' => $this->scopes,
                                'access_type' => 'offline',
index 021d21f1f4c12eea907dd13ef34510227b0844ef..2e30fdc304884e9900db04d05e49658499686272 100644 (file)
@@ -157,9 +157,9 @@ class UserController extends BaseUserController {
                        //Get google client
                        $googleClient = new \Google\Client(
                                [
                        //Get google client
                        $googleClient = new \Google\Client(
                                [
-                                       'application_name' => $request->server->get('RAPSYSAIR_GOOGLE_PROJECT'),
-                                       'client_id' => $request->server->get('RAPSYSAIR_GOOGLE_CLIENT'),
-                                       'client_secret' => $request->server->get('RAPSYSAIR_GOOGLE_SECRET'),
+                                       'application_name' => $_ENV['RAPSYSAIR_GOOGLE_PROJECT'],
+                                       'client_id' => $_ENV['GOOGLE_CLIENT_ID'],
+                                       'client_secret' => $_ENV['GOOGLE_CLIENT_SECRET'],
                                        'redirect_uri' => $this->generateUrl('rapsysair_google_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
                                        'scopes' => self::googleScopes,
                                        'access_type' => 'offline',
                                        'redirect_uri' => $this->generateUrl('rapsysair_google_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
                                        'scopes' => self::googleScopes,
                                        'access_type' => 'offline',
@@ -615,9 +615,9 @@ class UserController extends BaseUserController {
                //Get google client
                $googleClient = new \Google\Client(
                        [
                //Get google client
                $googleClient = new \Google\Client(
                        [
-                               'application_name' => $request->server->get('RAPSYSAIR_GOOGLE_PROJECT'),
-                               'client_id' => $request->server->get('RAPSYSAIR_GOOGLE_CLIENT'),
-                               'client_secret' => $request->server->get('RAPSYSAIR_GOOGLE_SECRET'),
+                               'application_name' => $_ENV['RAPSYSAIR_GOOGLE_PROJECT'],
+                               'client_id' => $_ENV['GOOGLE_CLIENT_ID'],
+                               'client_secret' => $_ENV['GOOGLE_CLIENT_SECRET'],
                                'redirect_uri' => $this->generateUrl('rapsysair_google_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
                                'scopes' => self::googleScopes,
                                'access_type' => 'offline',
                                'redirect_uri' => $this->generateUrl('rapsysair_google_callback', [], UrlGeneratorInterface::ABSOLUTE_URL),
                                'scopes' => self::googleScopes,
                                'access_type' => 'offline',
index 30a8f8a2ff50e531f6e6b9372d88a3a4263d1507..54f68ae5e93fc464ba08d663f0b33c7a895c7b94 100644 (file)
@@ -1,11 +1,7 @@
 # Parameters configuration
 parameters:
 # Parameters configuration
 parameters:
-    # Google client
-    env(RAPSYSAIR_GOOGLE_CLIENT): "Ch4ng3m3!"
     # Google project
     env(RAPSYSAIR_GOOGLE_PROJECT): "Ch4ng3m3!"
     # Google project
     env(RAPSYSAIR_GOOGLE_PROJECT): "Ch4ng3m3!"
-    # Google secret
-    env(RAPSYSAIR_GOOGLE_SECRET): "Ch4ng3m3!"
     # Hostname
     env(RAPSYSAIR_HOSTNAME): "Ch4ng3m3!"
     # Scheme
     # Hostname
     env(RAPSYSAIR_HOSTNAME): "Ch4ng3m3!"
     # Scheme