WCFでは、Windows 認証の他、さまざまなオプションをサポートする。その他の組み込みオプションとしては、ユーザー名トークン、X.509 証明書、SAML トークン、および InfoCard があるが、カスタムな認証メカニズムを定義することも可能。
( Windows Communication Foundation との関連における ASP.NET Web サービスの今後 からの抜粋 )
以下、とりあえず判明していることのメモ
WSHttpBinding バインディングセットを適用している場合、ServiceSecurityContext クラス (System.ServiceModel) のCurrent静的プロパティから現在のクライアントユーザーについてのServiceSecurityContextオブジェクトが取得できる。更に、そのServiceSecurityContextオブジェクトのWindowsIdentityプロパティにて、クライアントユーザーのWindowsユーザーアカウントを表すWindowsIdentityオブジェクトが取得できる。
ServiceSecurityContext currentServiceSecurityContext = ServiceSecurityContext.Current;
WindowsIdentity currentWindowsIdentity = currentServiceSecurityContext.WindowsIdentity;
BasicHttpBinding バインディングセットを適用している場合、ServiceSecurityContextクラスのCurrent静的プロパティはNullを返す。
認証関係は苦手です ><
というか、周りに詳しい人がいるから今までまともに勉強したことがないな。
一度、しっかり基礎から学ばなければ。。。
追記 ( 2007/03/11 )
こちらの記事で、もうちょいしっかりとまとめました。
トラックバックURL↓
http://csharper.blog57.fc2.com/tb.php/76-bb193841