1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
The error message you're encountering is likely due to an incorrect syntax in the command you're using. Here's the correct syntax for the aws iot test-invoke-authorizer command:
aws iot test-invoke-authorizer
--authorizer-name my-new-authorizer
--token "tokenKeyValue"
--token-signature "$(echo -n "tokenKeyValue" | openssl dgst -sha256 -sign private-key.pem | openssl base64)"
Note that the tokenKeyValue and the token-signature values need to be passed in quotes, as they are string values. Also, the calculation of the token-signature value should be included in the command.
답변함 일 년 전
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
Thank You for the reply. I followed your instructions. Now I am getting the following error: An error occurred (InvalidRequestException) when calling the TestInvokeAuthorizer operation: Token signature mismatch for authorizer my-new-authorizer.
I am using Openssl version:OpenSSL 1.1.1s 1 Nov 2022 Windows10. Kindly help
The error message suggests that the token signature you are passing in the command is incorrect. Here are a few steps you can try to resolve this issue:
am still getiing the error: An error occurred (InvalidRequestException) when calling the TestInvokeAuthorizer operation: Token signature mismatch for authorizer my-new-authorizer.
1.How to check tokenKeyValue value is correct? 2.How to verify the token signature calculation? I have ensured that the private-key.pem file is the correct private key that corresponds to the public key associated with the authorizer. Kindly help