|
|
|
|
@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray; |
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.auth0.jwk.Jwk; |
|
|
|
|
import io.jsonwebtoken.*; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.codec.binary.Base64; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
@ -25,6 +26,7 @@ import java.security.PublicKey; |
|
|
|
|
* | Author: CRMEB Team <admin@crmeb.com> |
|
|
|
|
* +---------------------------------------------------------------------- |
|
|
|
|
*/ |
|
|
|
|
@Slf4j |
|
|
|
|
public class AppleUtil { |
|
|
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(AppleUtil.class); |
|
|
|
|
@ -91,7 +93,7 @@ public class AppleUtil { |
|
|
|
|
try { |
|
|
|
|
Jws<Claims> claim = jwtParser.parseClaimsJws(jwt); |
|
|
|
|
if (claim != null && claim.getBody().containsKey("auth_time")) { |
|
|
|
|
log.info(claim); |
|
|
|
|
log.info(String.valueOf(claim)); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
|