Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9984

Support additional successful status codes in StandardOauth2AccessTokenProvider

    XMLWordPrintableJSON

Details

    Description

      The StandardOauth2AccessTokenProvider controller service only supports reponse status code 200:

      https://github.com/apache/nifi/blob/5aa71570ff1781f83f9fb8bf16ed3ab386d06b85/nifi-nar-bundles/nifi-standard-services/nifi-oauth2-provider-bundle/nifi-oauth2-provider-service/src/main/java/org/apache/nifi/oauth2/StandardOauth2AccessTokenProvider.java#L322

      And while this adheres to the RFC (https://datatracker.ietf.org/doc/html/rfc6749#section-5.1), it is not uncommon to use 201.

      One example:
      https://www.ibm.com/docs/en/dbaoc?topic=applications-using-oauth-20-based-authentication

      It would be useful if the StandardOauth2AccessTokenProvider controller service at least allowed for 201 in addition to 200.

      Attachments

        Issue Links

          Activity

            People

              exceptionfactory David Handermann
              andersns Anders
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m