public final class Sdk extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CHARACTER_ENCODING
The character encoding used.
|
static String |
DISABLE_REQUEST_SIGNATURE_CHECK_SYSTEM_PROPERTY
The
SpeechletServlet class enforces request
signing to ensure that all requests processed by your web service are legitimate and come
from the Alexa service. |
static String |
ECHO_API_DOMAIN_NAME
The domain name used by the Alexa Skills Kit API.
|
static String |
SIGNATURE_ALGORITHM
The algorithm used to generate the signature.
|
static String |
SIGNATURE_CERTIFICATE_CHAIN_URL_REQUEST_HEADER
The name of the request header that contains the URL for the certificate chain needed to
verify the request signature.
|
static String |
SIGNATURE_CERTIFICATE_TYPE
The format of the certificate needed to verify the request signature.
|
static String |
SIGNATURE_KEY_TYPE
The type of encryption key used to generate the signature.
|
static String |
SIGNATURE_REQUEST_HEADER
The name of the request header that contains the signature.
|
static String |
SUPPORTED_APPLICATION_IDS_SYSTEM_PROPERTY
The name of the system property that can be used to provide a comma-delimited list of
application IDs that this web service supports.
|
static String[] |
SUPPORTED_CIPHER_SUITES
Supported cipher suites for connections between the Alexa service and SpeechletServlets.
|
static String[] |
SUPPORTED_PROTOCOLS
Supported protocols for connections between the Alexa service and SpeechletServlets.
|
static String |
TIMESTAMP_TOLERANCE_SYSTEM_PROPERTY
The name of the system property that can be used to configure the timestamp tolerance (in
seconds) of the
SpeechletServlet. |
static String |
VERSION
The version number for this library.
|
public static final String VERSION
public static final String CHARACTER_ENCODING
public static final String SIGNATURE_REQUEST_HEADER
public static final String SIGNATURE_CERTIFICATE_CHAIN_URL_REQUEST_HEADER
public static final String SIGNATURE_CERTIFICATE_TYPE
public static final String SIGNATURE_ALGORITHM
public static final String SIGNATURE_KEY_TYPE
public static final String ECHO_API_DOMAIN_NAME
public static final String[] SUPPORTED_PROTOCOLS
public static final String[] SUPPORTED_CIPHER_SUITES
public static final String DISABLE_REQUEST_SIGNATURE_CHECK_SYSTEM_PROPERTY
The SpeechletServlet class enforces request
signing to ensure that all requests processed by your web service are legitimate and come
from the Alexa service. In order to test your service with a tool like curl, you need
to disable this mechanism. This is controlled by the
com.amazon.speech.speechlet.servlet.disableRequestSignatureCheck system property,
which is defined by this constant.
If you are starting your service from Eclipse, add the following to the VM arguments for the run configuration of Launcher:
-Dcom.amazon.speech.speechlet.servlet.disableRequestSignatureCheck=true
If you are starting your service using an Ant script, add the following property within the
<java> tag of your script:
<java classname="Launcher" classpathref="java.sdk.classpath" fork="true">
<sysproperty key="com.amazon.speech.speechlet.servlet.disableRequestSignatureCheck"
value="true" />
</java>
Disabling request signing verification is only acceptable for developing and testing. Your production system should always verify incoming requests.
public static final String SUPPORTED_APPLICATION_IDS_SYSTEM_PROPERTY
The name of the system property that can be used to provide a comma-delimited list of
application IDs that this web service supports. The
SpeechletServlet uses these identifiers to verify
that incoming requests are indeed associated with one of the configured application IDs.
Otherwise, the requests are rejected. By default, if this system property is missing or
consists of a blank string, any application ID (including null values) is accepted.
If your web service is expected to support two Alexa skills, with application IDs
amzn1.echo-sdk-ams.app.1234 and amzn1.echo-sdk-ams.app.5678, you should
configure Eclipse by adding the following VM argument to the run configuration of the
Launcher:
-Dcom.amazon.speech.speechlet.servlet.supportedApplicationIds=amzn1.echo-sdk-ams.app.1234,amzn1.echo-sdk-ams.app.5678
If you are starting your service using an Ant script, add the following property within the
<java> tag of your script:
<java classname="Launcher" classpathref="java.sdk.classpath" fork="true">
<sysproperty key="com.amazon.speech.speechlet.servlet.supportedApplicationIds"
value="amzn1.echo-sdk-ams.app.1234,amzn1.echo-sdk-ams.app.5678" />
</java>
public static final String TIMESTAMP_TOLERANCE_SYSTEM_PROPERTY
The name of the system property that can be used to configure the timestamp tolerance (in
seconds) of the SpeechletServlet. Requests with
timestamps outside of this inclusive tolerance range, either in the past or future, are
rejected. If this property is missing or cannot be parsed as a long value, timestamp
verification is disabled.
If you are starting your service from Eclipse, add the following to the VM arguments for the run configuration of Launcher to configure a tolerance of 150 seconds:
-Dcom.amazon.speech.speechlet.servlet.timestampTolerance=150
If you are starting your service using an Ant script, add the following property within the
<java> tag of your script:
<java classname="Launcher" classpathref="java.sdk.classpath" fork="true">
<sysproperty key="com.amazon.speech.speechlet.servlet.timestampTolerance"
value="150" />
</java>
Disabling timestamp verification is only acceptable for developing and testing. Your production system should always verify timestamps on incoming requests. We permit a tolerance of two minutes and thirty seconds (150 seconds).
Copyright © 2016. All rights reserved.