Azure-Samples / active-directory-dotnet-graphapi-web

A .NET 4.5 MVC web app that demonstrates how to query the Azure AD Graph API using the Azure AD Graph Client Library
82 stars 68 forks source link

Updating Startup.Auth.cs to support Certificate Credentials #28

Closed shawntabrizi closed 8 years ago

shawntabrizi commented 8 years ago

This is an update to the Startup.Auth code to allow support for authentication using Certificate Credential. Web.Config is updated to include a new called "ida:CertName" which can contain the CN of the certificate the user wants to use to authenticate. If the CertName value is empty, authentication with App Key will occur. If the CertName value is populated (certName.Length != 0), it will attempt to authenticate using a Client Certificate.