node-jose
node-jose copied to clipboard
base64 Url-Safe value for k
Hi.
I have a question regarding the 'k' field of JWK. According to the following specification : https://www.rfc-editor.org/rfc/rfc7518.html#section-6.4.1
Should values for the 'k' field other than Base64 URL Safe be accepted?
If I create an object using jose.JWK.asKey using the following values:
{"kty":"oct","use":"sig","alg":"HS256","k":"gCwIZwLqrzbygmkv/8+PMEnqL6TiMMfqK6v4YjLtc5I="}
The key is created even though the 'k' field contains a non-Base64 URL Safe value.
Thanks in advance