Uploaded image for project: 'CAS Server'
  1. CAS-1310

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0 RC1, 4.0
    • Component/s: OAuth
    • Labels:
      None

      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.
      **

        Attachments

          Activity

            People

            • Assignee:
              jleleu Jérôme LELEU
              Reporter:
              jleleu Jérôme LELEU
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: