Android SDK Version


public class OidcSecurityUtil
Field Summary
Modifier and TypeFieldDescription
private final StringOPENID_KEYS_PATH
private final StringSIGNATURE_ALGORITHM_SHA256
private final LongTIMEOUT_IN_MILLISECONDS
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_PATH()
final StringgetSIGNATURE_ALGORITHM_SHA256()
final LonggetTIMEOUT_IN_MILLISECONDS()
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_PATH

 final StringgetOPENID_KEYS_PATH()

getSIGNATURE_ALGORITHM_SHA256

 final StringgetSIGNATURE_ALGORITHM_SHA256()

getTIMEOUT_IN_MILLISECONDS

 final LonggetTIMEOUT_IN_MILLISECONDS()