CertificateManager.CreateJwkJsonFromCertificate method
Builds a JWK JSON (RSA) representation of the given certificate. By default only public parameters are included (safe for publishing as JWKS). Set includePrivateParameters to true if you want a full private JWK (for local storage only – never publish it).
public static string CreateJwkJsonFromCertificate(X509Certificate2 certificate,
bool includePrivateParameters = false)
| parameter | description |
|---|---|
| certificate | The X509 certificate to convert. |
| includePrivateParameters | Whether to include private key parameters in the JWK. |
Return Value
The JWK JSON string.
See Also
- class CertificateManager
- namespace Kestrun.Certificates