This chapter contains the following code samples:
- Authentication
- IdentitySample (with Microsoft.Identity.Client)
- WebAppWithADSample (ASP.NET Core with Azure AD)
- Encryption
- X509CertificateSample (get a certificate from Azure Key Vault)
- SigningDemo (signing using
ECDsaCng
) - SecureTransfer (encrypting and decrypting a message, this sample requires .NET 4.6)
- Web Security
- ASPNETCoreMVCSecurity (encoding, injection, XSRF)
Code sample X509CertificateSample:
The Key
property (X509Certificate2.PublicKey.Key) is obsolete. The method has been changed to use the GetRSAPublicKey
method, and accessing members of the RSA
class instead.
To configure the Azure Key Vault and create certificates using the Azure CLI see these bash scripts:
For code comments and issues please check Professional C#'s GitHub Repository
Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.
Thank you!