I'm using the following code to add the group during the user creation but there group-information is missing in the claims-variable:
`class MyOIDCAB(OIDCAuthenticationBackend):
def create_user(self, claims):
user = super(MyOIDCAB, self).create_user(claims)
usergroup = claims.get('roles', '')
if usergroup:
for i_group in usergroup:
try:
group = Group.objects.get(name=i_group)
if group:
user.groups.add(group)
except Group.DoesNotExist:
pass
user.save()
return user`
I tried to check the token via Postman and after the decoding of the id_token I was able to read the group. Is there any easy way to grep the payload of the id_token?
Hi,
I'm using the following code to add the group during the user creation but there group-information is missing in the claims-variable:
`class MyOIDCAB(OIDCAuthenticationBackend):
I tried to check the token via Postman and after the decoding of the id_token I was able to read the group. Is there any easy way to grep the payload of the id_token?