Beispiel #1
0
        public PolicyAssertion GetPolicyAssertion()
        {
            PolicyAssertion assertion;

            if (_authenticationType == AuthenticationType.UsernameToken)
            {
                UsernameToken token = new UsernameToken(_user, _password, _passwordMode);
                assertion = new UsernameTokenSoapAssertion(token);
            }
            else
            {
                X509SecurityToken token = new X509SecurityToken(_certificate);
                assertion = new X509SecurityTokenSoapAssertion(token);
            }

            return(assertion);
        }
Beispiel #2
0
 public UsernameOutputFilter(UsernameTokenSoapAssertion parent)
     : base("", true)
 {
     parentAssertion = parent;
     token           = parent.Token;
 }