public CustomSecurityClientOutputFilter(CustomSecurityAssertion parentAssertion) : base(parentAssertion.ServiceActor, true) { if (parentAssertion.BinaryToken == null) { userToken = new UsernameToken(parentAssertion.Username.Trim(), parentAssertion.Password.Trim(), PasswordOption.SendPlainText); signatureToken = GetSecurityToken(); parentAssertion.SecurityToken = signatureToken; } else { issuedToken = new IssuedToken(parentAssertion.BinaryToken); signatureToken = parentAssertion.SecurityToken; samlAssertionId = parentAssertion.BinaryToken.Attributes.GetNamedItem("ID").Value; } sig = new MessageSignature(signatureToken); }