Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16241

Endpoint DSL (http component) Properties are not correctly set for Basic Authentications

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8.0
    • Fix Version/s: 3.7.3, 3.9.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Using the following endpoint to line with the endpoint configuration, the http request fails

       

      .to(https("inline").authenticationPreemptive(true).authMethod("Basic").authUsername("{{prop.username}}").authPassword("{{prop.password}}"))

       

      If I'm using the equivalent line of:

      .to("https://inline?authMethod=Basic&authPassword={{prop.password}}&authUsername={{prop.username}}&authenticationPreemptive=true")

       

      the request are working fine.

       

      Debugging this one shows that with the endpoint setup, BasicAuthenticationHttpClientConfigurer is initialized with the properties, so here username="props.username".

       

      With just the java dsl, the correct username is loaded in the constructor.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              david.voit@osram-os.com David Voit
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: