SecureConversationServiceCredential.SecurityContextClaimTypes 속성

정의

쿠키 serialization에 Type 대한 클레임의 컬렉션을 가져옵니다.

public:
 property System::Collections::ObjectModel::Collection<Type ^> ^ SecurityContextClaimTypes { System::Collections::ObjectModel::Collection<Type ^> ^ get(); };
public System.Collections.ObjectModel.Collection<Type> SecurityContextClaimTypes { get; }
member this.SecurityContextClaimTypes : System.Collections.ObjectModel.Collection<Type>
Public ReadOnly Property SecurityContextClaimTypes As Collection(Of Type)

속성 값

쿠키 serialization에 Type 대한 클레임의 컬렉션입니다.

예제

다음 코드에서는 이 속성을 가져오는 방법을 보여 있습니다.

static void Configure(ServiceHost serviceHost)
{
    /*
     * There are certain settings that cannot be configured via app.config.
     * The security state encoder is one of them.
     * Plug in a SecurityStateEncoder that uses the configured certificate
     * to protect the security context token state.
     *
     * Note: You don't need a security state encoder for cookie mode.  This was added to the
     * sample to illustrate how you would plug in a custom security state encoder should
     * your scenario require one.
     * */
    serviceHost.Credentials.SecureConversationAuthentication.SecurityStateEncoder =
            new CertificateSecurityStateEncoder(serviceHost.Credentials.ServiceCertificate.Certificate);
   Collection<Type> myClaimTypes = new Collection<Type>();
    myClaimTypes = serviceHost.Credentials.SecureConversationAuthentication.SecurityContextClaimTypes;
}

설명

클레임을 SCT 쿠키로 직렬화하기 위해 WCF(Windows Communication Foundation)는 DataContractSerializer 기본값으로 사용합니다. 클레임 리소스를 확장할 수 있으므로 WCF를 사용하면 알려진 리소스 종류 목록을 제공할 수 있습니다. 이렇게 하면 원래 강력한 형식의 개체를 반환할 수 있도록 쿠키에서 클레임을 역직렬화하는 동안 도움이 DataContractSerializer 됩니다.

적용 대상