Oauthenticator.generic + ORCID ID

Hello,
I want to use ORCID ID (API Tutorial: Get an Authenticated ORCID iD - ORCID). ORCID will then return the researcher’s authenticated ORCID iD and an access token in JSON format:

{'id': 'https://orcid.org/0000-0002-9619-1002', 'sub': '0000-0002-9619-1002', 'name': 'Stephane POUYLLAU', 'family_name': 'Pouyllau', 'given_name': 'Stéphane'}

To create an user with:

#c.LocalGenericOAuthenticator.create_system_users = True

I would like to merge family_name and given_name to have an USERNAME for local account. Have an idea to do this ?

Best,

S.

Hello,
I found this solution:

c.GenericOAuthenticator.username_key = lambda t: t.get('family_name') + t.get('given_name')

I hope is the good way…
S.

1 Like