diff options
author | Vitaly Takmazov | 2020-09-10 21:15:15 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-09-10 21:15:15 +0300 |
commit | 613d1f98624a762cab61d807061705ed17f41b7f (patch) | |
tree | fbfd2f46b4b25fc2c1cf079b3bed717d05c94ca2 /src/main/java/com/github/scribejava | |
parent | 74ac239f422136d59d8d2fda4903ca87f23686b2 (diff) |
Update deps
* Fix breaking changes compatibility with nimbus-jose-jwt 9.0 and postcss-loader 4.0
Diffstat (limited to 'src/main/java/com/github/scribejava')
-rw-r--r-- | src/main/java/com/github/scribejava/apis/AppleSignInApi.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/github/scribejava/apis/AppleSignInApi.java b/src/main/java/com/github/scribejava/apis/AppleSignInApi.java index 7d960d35..7b0fae81 100644 --- a/src/main/java/com/github/scribejava/apis/AppleSignInApi.java +++ b/src/main/java/com/github/scribejava/apis/AppleSignInApi.java @@ -30,11 +30,11 @@ import com.nimbusds.jose.proc.SecurityContext; import com.nimbusds.jwt.proc.ConfigurableJWTProcessor; import com.nimbusds.jwt.proc.DefaultJWTClaimsVerifier; import com.nimbusds.jwt.proc.DefaultJWTProcessor; -import net.minidev.json.JSONObject; import java.net.MalformedURLException; import java.net.URL; import java.text.ParseException; +import java.util.Map; import java.util.Optional; public class AppleSignInApi extends DefaultApi20 { @@ -92,15 +92,15 @@ public class AppleSignInApi extends DefaultApi20 { jwtProcessor.setJWTClaimsSetVerifier(new DefaultJWTClaimsVerifier<>()); // Process the token - JSONObject claimsSet = null; + Map<String, Object> claimsSet; try { claimsSet = jwtProcessor.process(idToken, null).toJSONObject(); } catch (ParseException | BadJOSEException | JOSEException e) { return Optional.empty(); } - var email = claimsSet.getAsString("email"); - var verified = claimsSet.getAsString("email_verified").equals("true"); + String email = (String)claimsSet.get("email"); + boolean verified = claimsSet.get("email_verified").equals("true"); return verified ? Optional.of(email) : Optional.empty(); } } |