This documentation is archived and is not being maintained.

SecureConversationServiceCredential.SecurityContextClaimTypes Property

Gets a collection of the Type claims for cookie serialization.

Namespace:  System.ServiceModel.Security
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public Collection<Type> SecurityContextClaimTypes { get; }

Property Value

Type: System.Collections.ObjectModel.Collection<Type>
A collection of the Type claims for cookie serialization.

To serialize claims into SCT cookies, uses DataContractSerializer as the default. Because the Claim resource is extensible, allows you to provide a list of known resource types. This assists the DataContractSerializer during deserialization of the claims in the cookie so that it can return the original strongly-typed objects.

The following code shows how to get this property.

        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;

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.