From c2fa6ce7ce583284f719a9321c5a8f631242eabb Mon Sep 17 00:00:00 2001
From: Sonia Zorba <sonia.zorba@inaf.it>
Date: Mon, 12 Oct 2020 14:13:39 +0200
Subject: [PATCH] bugfix

---
 classes/model/CliOAuth2Client.php | 2 +-
 config-example.yaml               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/classes/model/CliOAuth2Client.php b/classes/model/CliOAuth2Client.php
index aabba3e..f549c74 100644
--- a/classes/model/CliOAuth2Client.php
+++ b/classes/model/CliOAuth2Client.php
@@ -15,7 +15,7 @@ class CliOAuth2Client {
     public function __construct(object $config) {
         $this->id = $config->id;
         $this->secretHash = $config->secret;
-        $this->scope = $config->scope;
+        $this->scope = explode(" ", $config->scope);
         $this->audience = $config->audience;
     }
 
diff --git a/config-example.yaml b/config-example.yaml
index dbb218e..cf625bb 100644
--- a/config-example.yaml
+++ b/config-example.yaml
@@ -74,4 +74,4 @@ cliClients:
   - id: gms_cli
     secret: 2a97516c354b68848cdbd8f54a226a0a55b21ed138e207ad6c5cbb9c00aa5aea
     scope: "read:gms write:gms read:rap"
-    audience: gms
\ No newline at end of file
+    audience: [gms]
\ No newline at end of file
-- 
GitLab