Class SkillRequestTimestampVerifierFactory
java.lang.Object
io.micronaut.aws.alexa.httpserver.verifiers.SkillRequestTimestampVerifierFactory
@Requires(property="alexa.verifiers.timestamp",
notEquals="false")
@Factory
public class SkillRequestTimestampVerifierFactory
extends Object
NOTICE: The method
timeStampToleranceSystemProperty()
is forked from https://github.com/alexa/alexa-skills-kit-sdk-for-java ask-sdk-servlet-support module.
Factory
to instantiate a request timestamp SkillServletVerifier
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Long
Returns the value of theAskHttpServerConstants.TIMESTAMP_TOLERANCE_SYSTEM_PROPERTY
JVM system property as aLong
, or returns null if the property is empty.
-
Constructor Details
-
SkillRequestTimestampVerifierFactory
public SkillRequestTimestampVerifierFactory()
-
-
Method Details
-
createSkillRequestTimestampVerifier
- Returns:
- Creates a
SkillRequestTimestampVerifier
with a tolerance in milliseconds which is specified with the system property "com.amazon.speech.speechlet.servlet.timestampTolerance" or the default value 30000L.
-
timeStampToleranceSystemProperty
Returns the value of theAskHttpServerConstants.TIMESTAMP_TOLERANCE_SYSTEM_PROPERTY
JVM system property as aLong
, or returns null if the property is empty.- Returns:
- value of the
AskHttpServerConstants.TIMESTAMP_TOLERANCE_SYSTEM_PROPERTY
system property as aLong
, or null if the property is empty. - Throws:
IllegalArgumentException
- if the system property is present but not parseable as a Long.
-