Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7201

Incorrect JSON return in openId connect UserInfo when no signature or encryption

    Details

    • Estimated Complexity:
      Moderate

      Description

      Hello,
      I'm using your org.apache.cxf.rs.security.oidc.idp.UserInfoService tu publish an OpenId connect UserInfo service. When returned JWT requires signature or encryption I get a correctly formatted JWT, but when no signature or encryption is required, returned JSON is not correctly formatted.

      Problem occurs because on the second scenario, JSON marshal is done out of scope of cxf jose jwt (by default json marshaller). On signature or encrypted JWT, JwtUtils.claimsToJson is used and result is OK.

      I've resolve this using a custom UserInfoService. I'm going to send a pull request with a fix hoping it could be useful.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sergey_beryozkin Sergey Beryozkin
                Reporter:
                elfogre Jose Escobar
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: