Skip to content

Commit

Permalink
Ignore any new field received from Apple instead of crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminFavre committed Oct 29, 2020
1 parent fc05430 commit d2ecfc8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
23 changes: 13 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>fr.benjaminfavre</groupId>
<artifactId>apple-social-identity-provider</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<name>Apple Social Identity Provider</name>
<description>Apple Social Identity Provider for Keycloak</description>
<url>https://github.com/BenjaminFavre/keycloak-apple-social-identity-provider</url>
Expand All @@ -27,23 +27,26 @@
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>2.0.2.Final</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>2.0.2.Final</version>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<compilerArgs>
<arg>-Xlint</arg>
</compilerArgs>
<verbose>true</verbose>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package fr.benjaminfavre.provider;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.keycloak.OAuth2Constants;
import org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider;
import org.keycloak.broker.oidc.OIDCIdentityProvider;
Expand Down Expand Up @@ -118,14 +119,14 @@ public Response authResponse(
}
}


@JsonIgnoreProperties(ignoreUnknown = true)
private static class User {
public String email;
public Name name;

@JsonIgnoreProperties(ignoreUnknown = true)
private static class Name {
public String firstName;
public String middleName;
public String lastName;
}
}
Expand Down

0 comments on commit d2ecfc8

Please sign in to comment.