-
public class OidcSecurityUtil
-
-
Field Summary
Fields Modifier and Type Field Description private final String
OPENID_KEYS_PATH
private final String
SIGNATURE_ALGORITHM_SHA256
private final Long
TIMEOUT_IN_MILLISECONDS
public final static OidcSecurityUtil
INSTANCE
-
Method Summary
Modifier and Type Method Description final static String
getRawKeyFromEndPoint(String kid)
final static PublicKey
getPublicKeyFromString(String key)
get the PublicKey object from public key string final static Boolean
verify(PublicKey publicKey, String data, String signature)
Verifies that the signature from the server matches the computed signature on the data. final String
getOPENID_KEYS_PATH()
final String
getSIGNATURE_ALGORITHM_SHA256()
final Long
getTIMEOUT_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()
-
-
-
-