Complex attributes are not properly returned by the OAuth /profile url

Description

Source : https://github.com/Jasig/cas/issues/259

**
Under our testing , user attributes can be generated after login successfully with CAS authentication.
Enable CAS server to support OAuth Server provider , user attributes , listed below , can not be generated correctly.

principal.getAttributes : {profile.displayname=Alex_Huang, profile.lastname=Huang, profile.phonenumber=02xxxxxxxx, profile.firstname=Alex, service.name=[webap1, webap2, webap3, webap4]}

After tracing the source code of 'OAuth20ProfileController.java',
We found this problem can be solved after changing line 63 of OAuth20ProfileController.java:
final JsonFactory jsonFactory = new JsonFactory();
to
final JsonFactory jsonFactory = new JsonFactory(new com.fasterxml.jackson.databind.ObjectMapper());

Maybe changing the source code above , the complex user attributes can be generated correctly.
**

Environment

None

Status

Assignee

Jérôme LELEU

Reporter

Jérôme LELEU

Labels

None

Estimated End Date

None

Audience

None

Components

Fix versions

Priority

Major