On 7/3/17 10:57, Stefan Winter wrote:
The example in 2.4 does not appear to be correct. I cannot decode "t":
base64 --decode
eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0.i3CYb7t4xfxCDquptFOepC9GAu_HLGkMlMuCGSK2rpiUfnK9ojFwDXb1JrErtmysazNjjvW2L9OkSSHzvoD1oA
{"typ":"JWT","alg":"ES256"}base64: ungültige Eingabe
I'll let the authors respond to your other points; but, as this is
simply a mechanical issue, I'll try to clarify the intended syntax (NOTE
TO AUTHORS: THERE IS STILL AN ERROR THAT NEEDS FIXING).
"t" contains a JWT, which consists of three separate base64 encoded
fields, delimited by a "." character: a header, a body, and a signature.
The signature, naturally, does not render as something readable when
decoded. Thus:
# echo eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9 | base64 --decode
{"typ":"JWT","alg":"ES256"}
# echo
eyJhdWQiOiJodHRwczovL3B1c2guZXhhbXBsZS5uZXQiLCJleHAiOjE0NTM1MjM3NjgsInN1YiI6Im1haWx0bzpwdXNoQGV4YW1wbGUuY29tIn0
| base64 --decode
{"aud":"https://push.example.net","exp":1453523768,"sub":"mailto:push@xxxxxxxxxxx
# echo
i3CYb7t4xfxCDquptFOepC9GAu_HLGkMlMuCGSK2rpiUfnK9ojFwDXb1JrErtmysazNjjvW2L9OkSSHzvoD1oA
| base64 --decode | od -tx1
0000000 8b 70 98 6f bb 78 c5 fc 42 0e ab a9 b4 53 9e a4
0000020 2f 46 02 ef c7 2c 69 0c 94 cb 82 19 22 b6 ae 98
0000040 94 7e 72 bd a2 31 70 0d 76 f5 26 b1 2b b6 6c ac
0000060 6b 33 63 8e f5 b6 2f d3 a4 49 21 f3 be 80 f5
0000077
So, there is an error, inasmuch as the body is missing a closing
quotation mark and a closing brace; but the base64 encoding is otherwise
okay.
/a