Export (0) Print
Expand All

ServiceCredentials.IssuedTokenAuthentication Property

Gets the current issued token (for example, SAML) authentication settings for this service.

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

public IssuedTokenServiceCredential IssuedTokenAuthentication { get; }

The following code shows how to access this property and use it to set additional properties.


	// This method configures the IssuedTokenAuthentication property of a ServiceHost.
	public static void ConfigureIssuedTokenServiceCredentials( 
        ServiceHost sh, bool allowCardspaceTokens, IList<X509Certificate2> knownissuers, 
        X509CertificateValidationMode certMode, X509RevocationMode revocationMode, SamlSerializer ser )
	{
	  // Allow CardSpace tokens.
	  sh.Credentials.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = allowCardspaceTokens;
	  
	  // Set up known issuer certificates.
	  foreach(X509Certificate2 cert in knownissuers)
		sh.Credentials.IssuedTokenAuthentication.KnownCertificates.Add ( cert );

	  // Set issuer certificate validation and revocation checking modes.
	  sh.Credentials.IssuedTokenAuthentication.CertificateValidationMode = 
          X509CertificateValidationMode.PeerOrChainTrust;
      sh.Credentials.IssuedTokenAuthentication.RevocationMode = X509RevocationMode.Online;
      sh.Credentials.IssuedTokenAuthentication.TrustedStoreLocation = StoreLocation.LocalMachine;

	  // Set the SamlSerializer, if one is specified.
	  if ( ser != null )
		sh.Credentials.IssuedTokenAuthentication.SamlSerializer = ser;
	}


.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.

Community Additions

ADD
Show:
© 2015 Microsoft