зеркало из
1
0
Форкнуть 0
This commit is contained in:
Larry Joy 2023-01-13 11:41:12 -08:00
Родитель d550e7d0f1
Коммит 39e8cd17a3
2 изменённых файлов: 0 добавлений и 65 удалений

Просмотреть файл

@ -1,35 +0,0 @@
# Tests For SMART Health Links
Test cases for the artifacts of SMART Health Links
<br><br>
#
## Link
- with/without viewer
- validate viewer format?
-
<br><br>
#
## SHLink Payload
### `url`
- Url contains at least 256-bits of entropy (43 base64url-encode chars)
### `key`
### `exp`
### `flag`
<br><br>
#
## Manifest URL
- Url contains at least 256-bits of entropy (43 base64url-encode chars)

Просмотреть файл

@ -73,33 +73,3 @@ export async function encode(
};
}
void (async () => {
const shl = await encode(
[
JSON.stringify({
"verifiableCredential": [
"eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1NiIsImtpZCI6IjNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.3ZJLj9MwFIX_yuiyzcNJmXaSHS0SL4FAM8MGdeE6t42RY0e2E7WM8t-5djsaQNPZABIiuxsfH5_z2XcgnYMaWu97V-e561FkruPWt8iVbzPBbeNy3POuV-hyUg9oIQG92UJdzOczVrDZVZHNq6sERgH1HfhDj1B_efD81e7ZcUjDQFbndbLrBi2_cS-NflIozCibooJ1AsJig9pLrq6HzVcUPkTattJ-RuuCTw3PM5YV5Bf-LgfdKAwai84MVuBNjA-nheRUB4RRityOSegAe6CO5DwodWsVCe7314wE98Mjxh-pDu0PDHmHRxPeSUV-8EKTxrp4xk6OqAPHt6YN8zKD9UQFN5LKv-Q-eBXVZZGyIi0ZTFPyaJri6TRvfkbsPPeDi3XDhXsMFzRyIaTGlWmigzCN1LsY3B2cx-70fuhmWrXIjN3lgWzuZJOLcU8GIu6Eki1gWk8J9CcEMc4WLeqQ7UeCJDJCDDYuhbI3sjtalLEwC7UI1dbYjt5jyMKFNzZYNtL1ikecy9XFK9Roubp4bVwvPVcEiiAq4z8M3SZsBRa_4izB8r8kWF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jNLZmRnLVh3UC03Z1h5eXd0VWZVQUR3QnVtRE9QS01ReC1pRUxMMTFXOXMifQ.3ZJLj9MwFIX_yuiyzcNJmXaSHS0SL4FAM8MGdeE6t42RY0e2E7WM8t-5djsaQNPZABIiuxsfH5_z2XcgnYMaWu97V-e561FkruPWt8iVbzPBbeNy3POuV-hyUg9oIQG92UJdzOczVrDZVZHNq6sERgH1HfhDj1B_efD81e7ZcUjDQFbndbLrBi2_cS-NflIozCibooJ1AsJig9pLrq6HzVcUPkTattJ-RuuCTw3PM5YV5Bf-LgfdKAwai84MVuBNjA-nheRUB4RRityOSegAe6CO5DwodWsVCe7314wE98Mjxh-pDu0PDHmHRxPeSUV-8EKTxrp4xk6OqAPHt6YN8zKD9UQFN5LKv-Q-eBXVZZGyIi0ZTFPyaJri6TRvfkbsPPeDi3XDhXsMFzRyIaTGlWmigzCN1LsY3B2cx-70fuhmWrXIjN3lgWzuZJOLcU8GIu6Eki1gWk8J9CcEMc4WLeqQ7UeCJDJCDDYuhbI3sjtalLEwC7UI1dbYjt5jyMKFNzZYNtL1ikecy9XFK9Roubp4bVwvPVcEiiAq4z8M3SZsBRa_4izB8r8kWFZ_muDiLMHZP0SQev8-wTJlVcou_8YbXBNEsLKhn-_fHVb7dtHPh0-08B0.kpV4IAUIXf5jI0ETA3JbVraT0g5-Pkq5DAC3TzihwnVJbYd2nt0u0wvhygIQXg8Gnz4X1r-Q34tTvrifp4v_Sg"
]
}),
],
'',
'1234',
Math.floor(Date.now() / 1000) + 365 * 60 * 60,
'https://viewer.example.org',
'Test',
'https://test-link',
'https://api.vaxx.link/api/shl');
console.log(JSON.stringify(shl, null, 2));
})()