以下のようなWCFバインディングを使用して、メッセージ交換中に実際のユーザー名とパスワード(クレデンシャル)が保存される場所に関する技術的な詳細を探しています。
<bindings>
<wsHttpBinding>
<binding name="wsHttp">
<security mode="TransportWithMessageCredential">
<transport/>
<message clientCredentialType="UserName"
negotiateServiceCredential="false"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
次に、クライアントアプリケーション内で、このサービスを呼び出して、次のような有効な資格情報のセットを渡します。
using (SupplierServiceClient client = new SupplierServiceClient()) {
client.ClientCredentials.UserName.UserName = "admin";
client.ClientCredentials.UserName.Password = "password";
SupplierList = client.GetSupplierCollection();
}
最初は、WCFがこのデータを取得してSOAPヘッダーに入れていると思いましたが、WSDLからはそのように表示されません...何か助けはありますか?
編集:
以下は、本番環境でのクライアントのセキュリティ構成の様子です。
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" />
<message clientCredentialType="UserName" establishSecurityContext="false" />
</security>