Skip to content
Snippets Groups Projects
Commit 5e353112 authored by Christian Pointner's avatar Christian Pointner
Browse files

cleanup oidc claims

parent 013ae4cc
No related branches found
No related tags found
No related merge requests found
...@@ -4,15 +4,26 @@ from oidc_provider.lib.claims import ScopeClaims ...@@ -4,15 +4,26 @@ from oidc_provider.lib.claims import ScopeClaims
class AuraScopeClaims(ScopeClaims): class AuraScopeClaims(ScopeClaims):
info_aura = ( info_username = (
_(u'aura'), _(u'username'),
_(u'AURA specific auth info (username, shows, etc.).'), _(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)) show_slugs = list(self.user.shows.all().values_list('slug', flat=True))
dic = { dic = {
'username': self.user.username,
'shows': show_slugs 'shows': show_slugs
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment