Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-6925

When getting a access token with a Basic HTTP client and a invalid grant_type the wrong error is returned

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13.0.0
    • Fix Version/s: 6.0.0, 5.5.2
    • Component/s: oauth2
    • Labels:
    • Environment:
      OpenAM-13.0.0 SNAPSHOT 22/9/15
    • Needs QA verification:
      No
    • Functional tests:
      Yes

      Description

      When using /oauth2/access_token with a Basic HTTP client and a invalid grant _type the error message has returned

      Request:

      curl -X POST --form "grant_type=0client_credentials" -H "Authorization: Basic T0F1dGgyQ2xpZW50OnBhc3N3b3Jk" http://amrwalktest.internal.forgerock.com:8080/openam/oauth2/access_token
      

      Response:

      HTTP/1.1 400 Bad Request
      Cache-Control: no-store
      Date: Wed, 23 Sep 2015 12:39:21 GMT
      Accept-Ranges: bytes
      Server: Restlet-Framework/2.3.4
      Pragma: no-cache
      Content-Type: application/json
      Transfer-Encoding: chunked
      Connection: close
      
      {
          "error": "invalid_request",
          "error_description": "Invalid Content Type"
      }
      

      Should be:

      HTTP/1.1 400 Bad Request
      Cache-Control: no-store
      Date: Wed, 23 Sep 2015 12:39:21 GMT
      Accept-Ranges: bytes
      Server: Restlet-Framework/2.3.4
      Pragma: no-cache
      Content-Type: application/json
      Transfer-Encoding: chunked
      Connection: close
      
      {
          "error": "invalid_request",
          "error_description": "Grant type is not set"
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              amrwalk Alex Walker [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: