-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 10.10
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Open Id
Currently the userinfo mappings are retrieved through specific classes.
See here:
https://github.com/nuxeo/nuxeo/tree/master/nuxeo-services/login/nuxeo-platform-login-openid/src/main/java/org/nuxeo/ecm/platform/oauth2/openid/auth
https://github.com/nuxeo/nuxeo/blob/master/nuxeo-services/login/nuxeo-platform-login-openid/src/main/java/org/nuxeo/ecm/platform/oauth2/openid/auth/github/GithubUserInfo.java
An improvement would be to use the UserMapperBasedResolver class and have this mapping configurable through contributions like for SAML:
https://doc.nuxeo.com/nxdoc/saml-20-authentication/#integrating-the-nuxeo-platform-with-a-saml-20-idp
<extension target="org.nuxeo.usermapper.service.UserMapperComponent" point="mapper"> <mapper name="saml" type="js"> <mapperScript> searchAttributes.put("username", userObject.getNameID().getValue()); userAttributes.put("email", userObject.getNameID().getValue()); </mapperScript> </mapper> </extension>