ServiceAuthorizationBehavior.ExternalAuthorizationPolicies プロパティ

定義

外部承認ポリシーのコレクションを取得または設定します。

public:
 property System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ ExternalAuthorizationPolicies { System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ get(); void set(System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ value); };
public System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> ExternalAuthorizationPolicies { get; set; }
member this.ExternalAuthorizationPolicies : System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> with get, set
Public Property ExternalAuthorizationPolicies As ReadOnlyCollection(Of IAuthorizationPolicy)

プロパティ値

ReadOnlyCollection<IAuthorizationPolicy>

外部承認ポリシーのコレクション。

例外

動作は読み取り専用です。

このプロパティを設定して一連の外部承認ポリシーを使用する方法を次のコードに示します。

ServiceHost myServiceHost = new ServiceHost(typeof(Calculator), baseUri);
ServiceAuthorizationBehavior myServiceBehavior =
    myServiceHost.Description.Behaviors.Find<ServiceAuthorizationBehavior>();
myServiceBehavior.PrincipalPermissionMode =
    PrincipalPermissionMode.UseAspNetRoles;
MyServiceAuthorizationManager sm = new MyServiceAuthorizationManager();
myServiceBehavior.ServiceAuthorizationManager = sm;
Dim myServiceHost As New ServiceHost(GetType(Calculator), baseUri)
Dim myServiceBehavior As ServiceAuthorizationBehavior = myServiceHost.Description.Behaviors.Find(Of ServiceAuthorizationBehavior)()
myServiceBehavior.PrincipalPermissionMode = PrincipalPermissionMode.UseAspNetRoles
Dim sm As New MyServiceAuthorizationManager()
myServiceBehavior.ServiceAuthorizationManager = sm

注釈

外部承認ポリシーは、ユーザーの ServiceSecurityContext を作成するポリシー評価プロセスに関与します。

適用対象