Пример #1
0
 public static void AddClientCertificate(this AuthenticationConfiguration configuration, SecurityTokenHandler handler)
 {
     configuration.AddMapping(new AuthenticationOptionMapping
     {
         TokenHandler = new SecurityTokenHandlerCollection { handler },
         Options = AuthenticationOptions.ForClientCertificate()
     });
 }
Пример #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()
            });
        }