Skip to content

Fixed authHeader bug #42909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2,962 commits into from
Closed

Conversation

wickdynex
Copy link
Contributor

Overview of Changes

  1. Add annotation @JsonIgnore on variable authHeader to avoid auto-serialization.
  2. Import package com.fasterxml.jackson.annotation.JsonIgnore to make annotation valid.

Related Issues

Fixed #42905

Type of Change

  • Fix bug

Impact

Now when class DockerRegistryUserAuthentication and DockerRegistryTokenAuthentication use method createAuthHeader() would't add "authHeader" : null field.

Test

I've already test the class DockerRegistryUserAuthentication and DockerRegistryTokenAuthentication method getAuthHeader(), but only write rough test code not create a new branch to test. Do I need create a new branch?

Effect of Test

image Use decode tools to display the original string. ### Expected Result:
{
  "username" : "Ben",
  "password" : "123455",
  "serveraddress" : "[email protected]",
  "email" : "https://docker.example.com"
}

it works as expected.

Note

If anything I did worked not as expected, plz contact with me. Finally, looking forward to your reply.

snicoll and others added 30 commits October 16, 2024 09:51
* pr/42718:
  Fix typos and formatting errors in documentation

Closes spring-projectsgh-42718
Extend message source configuration properties and auto-configuration to
support common messages.

See spring-projectsgh-42472
* pr/42472:
  Polish 'Allow common messages to be specified for message sources'
  Allow common messages to be specified for message sources

Closes spring-projectsgh-42472
* pr/42682:
  Strengthen package-like assertions

Closes spring-projectsgh-42682
mhalbritter and others added 28 commits October 24, 2024 12:53
* pr/42874:
  Add a test to verify that ReflectionHint for Hazelcast ClientConfig is present

Closes spring-projectsgh-42874
Rename `RestTemplateBuilder` methods for consistency:

* `setConnectTimeout` -> `connectTimeout`
* `setReadTimeout` -> `readTimeout`
* `setSslBundle` -> `sslBundle`

Closes spring-projectsgh-42884
Add a new `ClientHttpRequestFactoryBuilder` interface to support the
creation of `ClientHttpRequestFactory` instances. The new code will
ultimately replace the existing `ClientHttpRequestFactories` class.

The `ClientHttpRequestFactoryBuilder` is a functional interface with
additional static factory methods for the various supported
`ClientHttpRequestFactory` types. Each type has it's own builder
which should allow us to support additional customization in the future.

Unlike `ClientHttpRequestFactories`, the builder aligns with Spring
Framework defaults and will detect the `JdkClientHttpRequestFactory`
in preference of `SimpleClientHttpRequestFactory`.

This commit also relocates `ClientHttpRequestFactorySettings` to bring
it into the new `http.client` package.

See spring-projectsgh-36266
Refactor the internals of `RestTemplateBuilder` so that the new
`ClientHttpRequestFactoryBuilder` is used to create
`ClientHttpRequestFactory` instance.

See spring-projectsgh-36266
Add a `requestFactorySettings` method to `RestTemplateBuilder` to make
it easier to apply an existing `ClientHttpRequestFactorySettings`
instance.

Closes spring-projectsgh-42885
Add a new `WebServiceMessageSenderFactory` factory interface to replace
`HttpWebServiceMessageSenderBuilder`. The factory provides a general
purpose way of creating `WebServiceMessageSender` instances, but most
typically will be `ClientHttpRequestMessageSender` created from a
`ClientHttpRequestFactoryBuilder`.

A new `httpMessageSenderFactory` method has been added to the
`WebServiceTemplateBuilder` class. This allows any sender to be
plugged into the template.

Closes spring-projectsgh-42886
Add a new `HttpClientAutoConfiguration` class that provides
`ClientHttpRequestFactoryBuilder` and `ClientHttpRequestFactorySettings`
beans and new configuration properties.

The existing `RestTemplate`, `RestClient` and `WebServiceTemplate`
auto-configurations have been updated to make use of the new
HTTP client support.

Users may now set `spring.http.client` property to globally change
the `ClientHttpRequestFactory` used in their application.

Closes spring-projectsgh-36266
Deprecate `ClientHttpRequestFactories` and refactor its internals to
delegate to the new `ClientHttpRequestFactoryBuilder` interface.

Closes spring-projectsgh-36266
Update `ClientHttpRequestFactoryBuilder` implementations to ensure
that all libraries have consistent redirect follow behavior. Following
of redirects is enabled by default.

The `ClientHttpRequestFactorySettings` may be used to change if
redirects should be followed. The `spring.http.client.redirects`
property may also be used to update the default behavior.

Closes spring-projectsgh-42879
Update `ClientHttpRequestFactoryBuilder` implementations for
`HttpComponents`, `Jdk`, `Jetty` and `Reactor` to allow customization
of the underlying components.

Closes spring-projectsgh-39035
Update documentation with information on how to configure the HTTP
client globally.

Closes spring-projectsgh-42888
@wickdynex wickdynex closed this Oct 28, 2024
@bclozel bclozel added the status: invalid An issue that we don't feel is valid label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

Successfully merging this pull request may close these issues.