Testing your authorizers
You can use the TestInvokeAuthorizer API to test the invocation and return values of your authorizer. This API enables you to specify protocol metadata and test the signature validation in your authorizer.
The following tabs show how to use the AWS CLI to test your authorizer.
The value of the token-signature
parameter is the signed token.
To learn how to obtain this value, see Signing the token.
If your authorizer takes a user name and password, you can pass this
information by using the --mqtt-context
parameter. The following
tabs show how to use the TestInvokeAuthorizer
API to send a JSON
object that contains a user name, password, and client name to your custom
authorizer.
The password must be base64-encoded. The following example shows how to encode a password in a Unix-like environment.
echo -n
PASSWORD
| base64