You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "wangyp0701 (via GitHub)" <gi...@apache.org> on 2024/01/18 09:25:55 UTC
Re: [I] request help: 测试hmac-auth插件时提示Invalid signature [apisix]
wangyp0701 commented on issue #3334:
URL: https://github.com/apache/apisix/issues/3334#issuecomment-1898101759
hmac-auth-generate-signature
This is the shell script I used
```bash
SECRET="admin1"
MESSAGE='''GET
/get
age=36&name=james
admin2
Thu, 18 Jan 2024 06:51:16 GMT
User-Agent:curl/7.29.0
'''
# to lowercase hexits
echo -n "${MESSAGE}" | openssl dgst -sha256 -hmac $SECRET
# to base64
echo -n "${MESSAGE}" | openssl dgst -sha256 -hmac $SECRET -binary | base64
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org