Closed Tynamix closed 3 years ago
Thank you ! I prefered to ignore any new field received from Apple to prevent future crashes.
@BenjaminFavre Yes me to. I tried to add @JsonIgnoreProperties(ignoreUnknown = true)
to the classes. But it did not work. It was ignored ^^.
Apple added the field "middleName" to the json reponse.
After first authentication an error occured on keycloak server:
[0m[31m09:35:52,588 ERROR [org.keycloak.broker.oidc.OIDCIdentityProvider] (default task-1) Failed to parse userJson [{"name":{"firstName":"First","middleName":"","lastName":"Last"},"email":"some@email.de"}]: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "middleName" (class fr.benjaminfavre.provider.AppleIdentityProvider$User$Name), not marked as ignorable (2 known properties: "lastName", "firstName"]) at [Source: (String)"{"name":{"firstName":"First","middleName":"","lastName":"Last"},"email":"some@email.de"}"; line: 1, column: 44] (through reference chain: fr.benjaminfavre.provider.AppleIdentityProvider$User["name"]->fr.benjaminfavre.provider.AppleIdentityProvider$User$Name["middleName"])
It was not possible to extract firstName or lastName from the json response. With this PR all works again as expected.
P.S: I hate apple!