C# 在WCF中使用iParameterInspector进行身份验证
您好,我想使用下面的startegy来保护通过internet公开的WCF服务 在webconfig中将TransportWithMessageCredentials用作的安全模式 SSL和基于消息的安全性。但是我不想用 clientCredentialType=“Username”设置,原因如下 用户名密码验证程序出现问题C# 在WCF中使用iParameterInspector进行身份验证,c#,wcf,validation,authentication,wcf-security,C#,Wcf,Validation,Authentication,Wcf Security,您好,我想使用下面的startegy来保护通过internet公开的WCF服务 在webconfig中将TransportWithMessageCredentials用作的安全模式 SSL和基于消息的安全性。但是我不想用 clientCredentialType=“Username”设置,原因如下 用户名密码验证程序出现问题 使用自定义用户名密码验证器的问题是,使用这种方法只能验证用户名和密码。如果我 需要验证客户端在 请求对象,则此方法不起作用(至少我是 (不知道) net以外的客户端在设置
- 使用自定义用户名密码验证器的问题是,使用这种方法只能验证用户名和密码。如果我 需要验证客户端在 请求对象,则此方法不起作用(至少我是 (不知道)
- net以外的客户端在设置clientCredential时经常遇到问题
检查请求参数,请求对象将具有用户名 、密码和其他一些详细信息
public object BeforeCall(string operationName, object[] inputs)
{
for (int index = 0; index < inputs.Length; index++)
{
if (index == 0)
{
baseRequestDTO obj = inputs[index] as baseRequestDTO ;
if (obj != null))
{
// Call Authentication service passing baseRequestDTO
// validate username,password and other details
}
break;
}
}
}
调用前公共对象(字符串操作名,对象[]输入)
{
for(int index=0;index