Closed MortalFlesh closed 4 years ago
Hi,
When running on Windows, I have the following exception:
JsonWebToken.JwtDescriptorException: The header parameter 'alg' is required.
I will try to identify the freezing issue with MacOS.
You are not using correctly the key, and the signing algorithm cannot be infered. You should replace the instruction
let descriptor =
JwsDescriptor(
KeyId = key.ToString(),
by
let descriptor =
JwsDescriptor(
SigningKey = key,
The KeyId property only the identifier of the key, and written to the kid
header parameter.
If you are the owner of the key, I recommend to define the kid
on the key instead to specify directly on the descriptor.
Hello and thanks for a quick reply!
It works with a correct key SigningKey = key
.
I used a KeyId
because of the example, where there is a Key = key,
but I couldn't find a Key
property, so I though a KeyId
is the closest and then I forget about it, so I didn't try a different property.
Thank you for help 👍
Good catch. The example in the readme is updated.
Hello,
I'm trying to generate a token, but it freezes at writing... am I doing something wrong?
I'm using F# with .netcore 3.1 on Mac OS (10.15.4).
Output is: