From 5e353112e071f80cb839a74048a5f5b16e7ea121 Mon Sep 17 00:00:00 2001
From: Christian Pointner <equinox@spreadspace.org>
Date: Sat, 16 Mar 2019 14:25:31 +0100
Subject: [PATCH] cleanup oidc claims

---
 pv/oidc_provider_settings.py | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/pv/oidc_provider_settings.py b/pv/oidc_provider_settings.py
index 481a9072..e1b96998 100644
--- a/pv/oidc_provider_settings.py
+++ b/pv/oidc_provider_settings.py
@@ -4,15 +4,26 @@ from oidc_provider.lib.claims import ScopeClaims
 
 class AuraScopeClaims(ScopeClaims):
 
-    info_aura = (
-        _(u'aura'),
-        _(u'AURA specific auth info (username, shows, etc.).'),
+    info_username = (
+        _(u'username'),
+        _(u'Your username.'),
     )
 
-    def scope_aura(self):
+    def scope_username(self):
+        dic = {
+            'username': self.user.username
+        }
+
+        return dic
+
+    info_aura_shows = (
+        _(u'AURA Shows'),
+        _(u'AURA shows you have access to.'),
+    )
+
+    def scope_aura_shows(self):
         show_slugs = list(self.user.shows.all().values_list('slug', flat=True))
         dic = {
-            'username': self.user.username,
             'shows': show_slugs
         }
 
-- 
GitLab