Adds the extra fields that we can currently get from ADFS to the database:
userTitle: The title of the user within the City of Toronto
firstName: The user's first name
lastName: The user's last name
department: The user's department within the City of Toronto
I'm not sure which of these will be populated within ADFS for production accounts, so they will be returned as null if they aren't defined or are blank.
There is also an issue that we were using the sub value as the unique key for a user and in local the new client_id is returning new values for this, so get duplicate values. I've tried to mitigate this by looking for an email match, and updating the user record (including the sub value) if a sub match isn't found.
Tests
All existing tests are passing, but no new tests were created for this yet.
Issue Addressed
This PR closes MOVE-1263 and MOVE-1265
Description
Adds the extra fields that we can currently get from ADFS to the database:
userTitle
: The title of the user within the City of TorontofirstName
: The user's first namelastName
: The user's last namedepartment
: The user's department within the City of TorontoI'm not sure which of these will be populated within ADFS for production accounts, so they will be returned as
null
if they aren't defined or are blank.There is also an issue that we were using the
sub
value as the unique key for a user and in local the newclient_id
is returning new values for this, so get duplicate values. I've tried to mitigate this by looking for an email match, and updating the user record (including thesub
value) if asub
match isn't found.Tests
All existing tests are passing, but no new tests were created for this yet.