-
public class OidcSecurityUtil
-
-
Field Summary
Fields Modifier and Type Field Description private final StringOPENID_KEYS_URL_STRINGprivate final StringSIGNATURE_ALGORITHM_SHA256public final static OidcSecurityUtilINSTANCE
-
Method Summary
Modifier and Type Method Description final static StringgetRawKeyFromEndPoint(String kid)final static PublicKeygetPublicKeyFromString(String key)get the PublicKey object from public key string final static Booleanverify(PublicKey publicKey, String data, String signature)Verifies that the signature from the server matches the computed signature on the data. final StringgetOPENID_KEYS_URL_STRING()final StringgetSIGNATURE_ALGORITHM_SHA256()-
-
Method Detail
-
getRawKeyFromEndPoint
final static String getRawKeyFromEndPoint(String kid)
-
getPublicKeyFromString
final static PublicKey getPublicKeyFromString(String key)
get the PublicKey object from public key string
- Parameters:
key- the public key in string format, could begin with "-----BEGIN PUBLIC KEY-----"
-
verify
final static Boolean verify(PublicKey publicKey, String data, String signature)
Verifies that the signature from the server matches the computed signature on the data. Returns true if the data is correctly signed.
- Parameters:
publicKey- public key associated with the developer accountdata- encoded data string need to be verify againstsignature- encoded signature from Authentication Token
-
getOPENID_KEYS_URL_STRING
final String getOPENID_KEYS_URL_STRING()
-
getSIGNATURE_ALGORITHM_SHA256
final String getSIGNATURE_ALGORITHM_SHA256()
-
-
-
-