@Requires(property="alexa.verifiers.signature",notEquals="false") @Requires(condition=RequestSignatureCheckSystemPropertyCondition.class) @Singleton public class SkillRequestSignatureVerifier extends java.lang.Object implements SkillServletVerifier
Constructor and Description |
---|
SkillRequestSignatureVerifier()
Constructor to build an instance of SkillRequestSignatureVerifier.
|
SkillRequestSignatureVerifier(java.net.Proxy proxy) |
Modifier and Type | Method and Description |
---|---|
static void |
closeQuietly(java.io.Closeable closeable)
Close and eats exception if any.
|
java.security.cert.X509Certificate |
getCertificateFromCache(java.lang.String url) |
void |
verify(AlexaHttpRequest alexaHttpRequest)
Verifies the certificate authenticity using the configured TrustStore and the signature of
the skill request.
|
public SkillRequestSignatureVerifier()
public SkillRequestSignatureVerifier(java.net.Proxy proxy)
proxy
- proxy configuration for certificate retrievalpublic java.security.cert.X509Certificate getCertificateFromCache(java.lang.String url)
url
- URL where the certificate can be found.public void verify(AlexaHttpRequest alexaHttpRequest)
SecurityException
if the signature
does not pass verification.
Verifies an incoming request.verify
in interface SkillServletVerifier
alexaHttpRequest
- request performed by Alexapublic static void closeQuietly(java.io.Closeable closeable)
closeable
- Closeable object.