Closed AugustoZanoni closed 3 years ago
Hey @AugustoZanoni, thanks so much for the contribution! 🎉
Someone on the team will review this shortly :)
@AugustoZanoni , thank you for the contribution. Regarding the change in this PR, nbf
is the correct payload prop name, so there must be something else wrong in your case. When joining a meeting with JWT, you can see any errors related to JWT in the developer console.
Please note that this sample supports only PCKS#1 keys for now, I did some addings to the sample app in order to support also PCKS#8 unecrypted, will create PR soon. If you used the Key pair generator from the JaaS console, it will generate PCKS#8 key. This needs to be changed for PCKS#8:
Replace:
rsa.ImportRSAPrivateKey(privateKeyDecoded, out _);
with:
rsa.ImportPkcs8PrivateKey(privateKeyDecoded, out _);
and also replace in the consts :
"-----BEGIN RSA PRIVATE KEY-----" with "-----BEGIN PRIVATE KEY-----"
"-----END RSA PRIVATE KEY-----" with "-----END PRIVATE KEY-----"
Using the sample app in it's listed state and my own generated Key Pair PCKS#1 I was able to generate a valid JWT with which I successfully joined a meeting by only putting the correct values for the AppId, kid , email, full name in the generator. Please let me know if you still have troubles with it.
Regarding your .NET sample, I'm adding also generating a JWT signed with the rsa key and if all good will create a PR with that as well.
Thank you again.
There is a missing tag that changed and got me 3 days of debuggin to find out it was an error on the sample code.
Side note: I use .NET Framework 4.6.1 and this sample only works in .NET Core 3 or above. So I had to change my sample to work propertly. I will share my code in this description and sugges to the team to publish this sample as optional for who is implementing it on .NET Framework: