Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

remcojansen
Copy link

Enables ignoring unknown JSON properties on OIDCClientRepresentation and adjusts / extends integration tests accordingly.

This is required to adhere to section 2 of RFC 7591 which documents that "the authorization server MUST ignore any client metadata sent by the client that it does not understand".

Closes #14946

Enables ignoring unknown JSON properties on OIDCClientRepresentation and adjusts / extends integration tests accordingly.

This is required to adhere to section 2 of RFC 7591 which documents that "the authorization server MUST ignore any client metadata sent by the client that it does not understand".

Closes keycloak#14946

Signed-off-by: Remco Jansen <[email protected]>
Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@remcojansen Thanks for the PR. I've added one inline comment. Can you please check that?

* @author <a href="mailto:[email protected]">Stian Thorgersen</a>
*/
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE)
@JsonIgnoreProperties(ignoreUnknown = true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to instead introduce otherClaims map with @JsonAnyGetter and @JsonAnySetter where the unknown claims will be saved? It might be better, so that custom providers are able to parse unknown fields. WDYT?

See the class JsonWebToken for the inspiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unrecognized JSON field causes DCR to fail

2 participants