Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17326

BasicAuthorizationInterceptor should add its header conditionally

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.16
    • Fix Version/s: 5.1.1
    • Component/s: Web:Client
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      BasicAuthorizationInterceptor made including auth headers in a RestTemplate much easier, but it has the downside of adding its header unconditionally. This means that there's no reliable way for the consumer to override the header for a particular request (such as one made using delegated credentials).

      I suggest making the add operation conditional on the Authorization header's not already being present in the request headers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                w_c_smith Christopher Smith
                Last updater:
                Spring Issuemaster
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 1 week, 6 days ago