Commit f4e72c80 by Clinton Blackburn

Added given and family name fields to profile scope

This information mirrors the fields returned in our ID token for OpenID
Connect (OIDC). Including this information will allow us to eventually
migrate toward replacing OIDC with OAuth 2.0 + JWT.

ECOM-3628
parent 9dc3fd77
......@@ -67,8 +67,12 @@ class AccessTokenMixin(object):
except UserProfile.DoesNotExist:
name = None
expected['name'] = name
expected['administrator'] = user.is_staff
expected.update({
'name': name,
'administrator': user.is_staff,
'family_name': user.last_name,
'given_name': user.first_name,
})
self.assertDictContainsSubset(expected, payload)
......
......@@ -93,6 +93,8 @@ class JwtBuilder(object):
payload.update({
'name': name,
'family_name': self.user.last_name,
'given_name': self.user.first_name,
'administrator': self.user.is_staff,
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment