Ejemplo n.º 1
0
 public static void AddClientCertificate(this AuthenticationConfiguration configuration, SecurityTokenHandler handler)
 {
     configuration.AddMapping(new AuthenticationOptionMapping
     {
         TokenHandler = new SecurityTokenHandlerCollection { handler },
         Options = AuthenticationOptions.ForClientCertificate()
     });
 }
Ejemplo n.º 2
0
        public static void AddClientCertificate(this AuthenticationConfiguration configuration, ClientCertificateMode mode, params string[] values)
        {
            var handler = new ClientCertificateHandler(mode, values);

            configuration.AddMapping(new AuthenticationOptionMapping
            {
                TokenHandler = new SecurityTokenHandlerCollection { handler },
                Options = AuthenticationOptions.ForClientCertificate()
            });
        }