From a590eb0be3908402cbcf27d630ea80a47bdcedbb Mon Sep 17 00:00:00 2001 From: Patrick Landolt Date: Tue, 21 Nov 2017 08:47:41 +0100 Subject: [PATCH] using env vars for id and secreat; removing dummy constructor --- .../apibundle/0.1/config/packages/mailxpert_apibundle.yaml | 4 ++-- mailxpert/apibundle/0.1/manifest.json | 4 ++++ mailxpert/apibundle/0.1/src/Entity/AccessToken.php | 5 ----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/mailxpert/apibundle/0.1/config/packages/mailxpert_apibundle.yaml b/mailxpert/apibundle/0.1/config/packages/mailxpert_apibundle.yaml index f1d4ecb2..dfe16373 100644 --- a/mailxpert/apibundle/0.1/config/packages/mailxpert_apibundle.yaml +++ b/mailxpert/apibundle/0.1/config/packages/mailxpert_apibundle.yaml @@ -1,6 +1,6 @@ mailxpert_api: access_token_class: App\Entity\AccessToken oauth: - client_id: 'client_id_to_replace' - client_secret: 'client_secret_to_replace' + client_id: '%env(MAILXPERT_CLIENT_ID)%' + client_secret: '%env(MAILXPERT_CLIENT_SECRET)%' redirect_url: 'http://example.com/mx/oauth/code' diff --git a/mailxpert/apibundle/0.1/manifest.json b/mailxpert/apibundle/0.1/manifest.json index cf87e333..6530da9a 100644 --- a/mailxpert/apibundle/0.1/manifest.json +++ b/mailxpert/apibundle/0.1/manifest.json @@ -5,5 +5,9 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/", "src/Entity/AccessToken.php": "%SRC_DIR%/Entity/AccessToken.php" + }, + "env": { + "MAILXPERT_CLIENT_ID": "mailxpert_client_id_to_replace", + "MAILXPERT_CLIENT_SECRET": "mailxpert_client_secret_to_replace" } } diff --git a/mailxpert/apibundle/0.1/src/Entity/AccessToken.php b/mailxpert/apibundle/0.1/src/Entity/AccessToken.php index 298ab24b..24bbb4bc 100644 --- a/mailxpert/apibundle/0.1/src/Entity/AccessToken.php +++ b/mailxpert/apibundle/0.1/src/Entity/AccessToken.php @@ -18,9 +18,4 @@ class AccessToken extends BaseAccessToken */ protected $id; - public function __construct() - { - parent::__construct(); - // your own logic - } }