Skip to content

Conversation

@adenix
Copy link
Contributor

@adenix adenix commented Oct 7, 2025

Changes

This PR adds support for the is_token_endpoint_ip_header_trusted property to the Client class in the Management API.

Classes and methods added:

  • Added isTokenEndpointIpHeaderTrusted field to Client class with @JsonProperty annotation
  • Added getIsTokenEndpointIpHeaderTrusted() getter method with JavaDoc
  • Added setIsTokenEndpointIpHeaderTrusted(Boolean) setter method with JavaDoc

Summary of usage:

// Create or update a client with the token endpoint IP header trusted setting
Client client = new Client("My Application");
client.setIsTokenEndpointIpHeaderTrusted(true);

// Read the setting from an existing client
Boolean isTrusted = client.getIsTokenEndpointIpHeaderTrusted();

This property controls whether the token endpoint trusts IP headers for the application, which is relevant for scenarios where the application operates behind proxies or load balancers.

References

Testing

This change has been tested with comprehensive unit tests covering both serialization and deserialization:

  • This change adds test coverage
    • Updated ClientTest.shouldSerialize() to verify the field serializes correctly to JSON
    • Updated ClientTest.shouldDeserialize() to verify the field deserializes correctly from JSON
    • Added field to test JSON fixtures
  • This change has been tested on the latest version of the platform/language
    • All tests pass with Java 8+
    • Verified with ./gradlew test --tests ClientTest

Test coverage includes:

  • JSON serialization with field present and set to true
  • JSON deserialization with field present and set to true
  • Getter/setter functionality
  • Proper @JsonProperty mapping to snake_case API field name

Checklist

@adenix adenix requested a review from a team as a code owner October 7, 2025 00:41
@adenix adenix force-pushed the feature/client-is-token-endpoint-id-header-trusted branch 3 times, most recently from d2113e9 to cf51816 Compare October 7, 2025 03:40
Add support for the is_token_endpoint_ip_header_trusted property
in the Client class with proper JavaDoc documentation and test coverage.

- Add isTokenEndpointIpHeaderTrusted field with @JsonProperty annotation
- Add getter and setter methods with JavaDoc following class conventions
- Update ClientTest with serialization and deserialization tests
- Verify all tests pass successfully
@adenix adenix force-pushed the feature/client-is-token-endpoint-id-header-trusted branch from cf51816 to a59a1c2 Compare October 7, 2025 03:45
@adenix
Copy link
Contributor Author

adenix commented Oct 7, 2025

Adds support for #777

* Whether the token endpoint IP header is trusted for this application.
*
* @return true if the token endpoint IP header is trusted, false otherwise.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add @JsonProperty("is_token_endpoint_ip_header_trusted"), to ensure consistent serialization/deserialization of the property

*
* @param isTokenEndpointIpHeaderTrusted whether the token endpoint IP header is trusted or not.
*/
public void setIsTokenEndpointIpHeaderTrusted(Boolean isTokenEndpointIpHeaderTrusted) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add @JsonProperty("is_token_endpoint_ip_header_trusted") on setter, to ensure consistent serialization/deserialization of the property.

@tanya732
Copy link
Contributor

Closing this PR, as fix has been released in v2.26.0 in #782

@tanya732 tanya732 closed this Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants