ApiKey

protected constructor(encodedApiKey: String, publicKey: String, decoder: ApiKey.Property.Decoder<P>)(source)

Instantiates a new ApiKey instance, verifying the associated RSASignature within provided encodedApiKey, using the provided RSAKey.Public. Data is subsequently reconstructed from encodedApiKey.

Parameters

encodedApiKey

the resultant text output by ApiKey.encoded

publicKey

the base64 encoded RSAKey.Public

decoder

the Property.Decoder associated with this ApiKey

Throws

IllegalArgumentException

if encodedApiKey is not valid, or base64 decoding fails

GeneralSecurityException

if publicKey or the RSASignature is invalid