上传者: 42160398
|
上传时间: 2022-02-15 17:50:13
|
文件大小: 17KB
|
文件类型: -
APP端苹果登录java初步校准
主要验证苹果授权登录令牌是否正确
主要方法
public RSAPublicKeySpec build(final String n, final String e) {
final BigInteger modulus = new BigInteger(1, Base64.decodeBase64(n));
final BigInteger publicExponent = new BigInteger(1, Base64.decodeBase64(e));
return new RSAPublicKeySpec(modulus, publicExponent);
}
public int verify(final PublicKey key, final String jwt, final String audience, final Strin