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

AbstractGrant.toMap hardcode the grandType to Client_Credentials

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Unknown

    Description

      AbstractGrant.toMap method has this line:
      map.putSingle(OAuthConstants.GRANT_TYPE, OAuthConstants.CLIENT_CREDENTIALS_GRANT);

      When the subclass, ResourceOwnerGrant overides this toMap, it calls the super.toMap(), which will cause this wrong value being added.

      So, I think we should fix this by calling map.putSingle(OAuthConstants.GRANT_TYPE, getType()).
      This way it will work for all 4 subclasses and will automatically work for future new class. Another way is to fix the ResourceOwnerGrant by not calling super.toMap.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sergey_beryozkin Sergey Beryozkin
            jasonw_nz Jason Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment