Un-tested client examples

This commit is contained in:
kexkey
2018-10-08 12:03:32 -04:00
parent 2b67da35b2
commit b60cb3f1db
3 changed files with 7 additions and 9 deletions

View File

@@ -7,7 +7,6 @@ invoke_cyphernode()
local action=${1}
local post=${2}
local h64=$(echo "{\"alg\":\"HS256\",\"typ\":\"JWT\"}" | base64)
local p64=$(echo "{\"id\":\"${id}\",\"exp\":$((`date +"%s"`+10))}" | base64)
local s=$(echo "$h64.$p64" | openssl dgst -hmac "$key" -sha256 -r | cut -sd ' ' -f1)
local token="$h64.$p64.$s"

View File

@@ -1,3 +1,4 @@
# Provided by cyphernode, see api_auth_docker/README.md
h64='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9Cg=='
id=001
key=2df1eeea370eacdc5cf7e96c2d82140d1568079a5d4d87006ec8718a98883b36