sudo apt-get update
sudo apt-get upgrade
header := encodeSegment([]byte(`{"alg":"HS256","typ":"JWT"}`)) | |
// token is valid for 60 seconds | |
payloadJSON := fmt.Sprintf(`{"userId":"2718281828459","iat":%d}`, time.Now().Add(60*time.Second).Unix()) | |
payload := encodeSegment([]byte(payloadJSON)) | |
key := "secret" | |
hmac := hmac.New(sha256.New, []byte(key)) | |
hmac.Write([]byte(header + "." + payload)) | |
signature := encodeSegment(hmac.Sum(nil)) | |
token := header + "." + payload + "." + signature |
#!/bin/bash | |
if [ $# -ne 4 ] | |
then | |
echo "Usage: $0 <host> <port> <pattern> <seconds>" | |
exit 1 | |
fi | |
cursor=-1 | |
keys="" |
<script async src="https://yourdomain.fpjs.pro/fp.js"></script> | |
<script> | |
window.fpLayer = window.fpLayer || []; | |
function fp() { fpLayer.push(arguments); } | |
fp('config', 'client', 'client-id'); | |
// if you want to send data | |
// automatically on page load | |
fp('config', 'autoSend', true); | |
</script> |