I am somewhat confused with the difference between certificates and signing keys and have a few questions....
I have OpenIddict configured to use JWT Bearer Authentication.
1) What is the difference between AddDevelopmentSigningCertificate() and AddEphemeralSigningKey()?
My app works when I use one or the other. Does it matter which one to use during development?
2) What is the difference between AddSigningCertificate() and AddSigningKey() and when would you use one or the other or both?
From what I understand, the signing certificate is used to sign the JWT token. But when you use AddSigningKey - that is also used to sign the JWT token. If you use both, does this mean that the JWT token gets signed twice - one on top of the other? Or does one override the other?
In my scenario I am using either AddDevelopmentCertificate() or AddEphemeralSigningKey() for development but for production I understand that I need to set up a signed certificate that ideally should be located in the machine store.
But I also require a unique signing key that is shared with my API endpoint (in .NET Framework 4.x) that uses JWT Bearer Authentication.
I would like to know what these functions are doing to the JWT token and how they work with each other.
Last question: When setting up the OpenIddict tables, and seeding the database with the Client app, there is a Client Secret that is populated. In the Samples project these are always GUIDs.
3) Is the client secret used when using JWT Bearer authentication? And how does this play along with the signing certificate and signing key?
I really want to understand how this stuff all works but am getting a bit lost in the signing key/certificate wilderness!
Thanks