-
public class OidcSecurityUtil
-
-
Field Summary
Fields Modifier and Type Field Description private final StringOPENID_KEYS_PATHprivate final StringSIGNATURE_ALGORITHM_SHA256private final LongTIMEOUT_IN_MILLISECONDSpublic 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_PATH()final StringgetSIGNATURE_ALGORITHM_SHA256()final LonggetTIMEOUT_IN_MILLISECONDS()-
-
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_PATH
final String getOPENID_KEYS_PATH()
-
getSIGNATURE_ALGORITHM_SHA256
final String getSIGNATURE_ALGORITHM_SHA256()
-
getTIMEOUT_IN_MILLISECONDS
final Long getTIMEOUT_IN_MILLISECONDS()
-
-
-
-