Android SDK Version


public class OidcSecurityUtil
Field Summary
Modifier and TypeFieldDescription
private final StringOPENID_KEYS_URL_STRING
private final StringSIGNATURE_ALGORITHM_SHA256
public final static OidcSecurityUtilINSTANCE
Method Summary
Modifier and TypeMethodDescription
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()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail

getRawKeyFromEndPoint

 final static StringgetRawKeyFromEndPoint(String kid)

getPublicKeyFromString

 final static PublicKeygetPublicKeyFromString(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 Booleanverify(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 account
data - encoded data string need to be verify against
signature - encoded signature from Authentication Token

getOPENID_KEYS_URL_STRING

 final StringgetOPENID_KEYS_URL_STRING()

getSIGNATURE_ALGORITHM_SHA256

 final StringgetSIGNATURE_ALGORITHM_SHA256()