共用方式為


FederatedMessageSecurityOverHttp.IssuedTokenType 屬性

定義

指定安全性權杖服務所應發行的權杖類型。

public:
 property System::String ^ IssuedTokenType { System::String ^ get(); void set(System::String ^ value); };
public string IssuedTokenType { get; set; }
member this.IssuedTokenType : string with get, set
Public Property IssuedTokenType As String

屬性值

String

要發行的權杖類型。 預設為 null,會讓 WCF 從 STS 要求 SAML 安全性權杖。

範例

下列程式碼示範如何從繫結存取這個屬性並加以設定。

// This method creates a WSFederationHttpBinding.
public static WSFederationHttpBinding
    CreateWSFederationHttpBinding(bool isClient)
{
  // Create an instance of the WSFederationHttpBinding.
  WSFederationHttpBinding b = new WSFederationHttpBinding();

  // Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message;

  // Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15;

  // Set NegotiateServiceCredential to true.
  b.Security.Message.NegotiateServiceCredential = true;

  // Set IssuedKeyType to Symmetric.
  b.Security.Message.IssuedKeyType = SecurityKeyType.SymmetricKey;

  // Set IssuedTokenType to SAML 1.1
  b.Security.Message.IssuedTokenType =
      "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#samlv1.1";
' This method creates a WSFederationHttpBinding.
Public Shared Function CreateWSFederationHttpBinding(ByVal isClient As Boolean) As WSFederationHttpBinding
  ' Create an instance of the WSFederationHttpBinding.
  Dim b As New WSFederationHttpBinding()

  ' Set the security mode to Message.
  b.Security.Mode = WSFederationHttpSecurityMode.Message

  ' Set the Algorithm Suite to Basic256Rsa15.
  b.Security.Message.AlgorithmSuite = SecurityAlgorithmSuite.Basic256Rsa15

  ' Set NegotiateServiceCredential to true.
  b.Security.Message.NegotiateServiceCredential = True

  ' Set IssuedKeyType to Symmetric.
  b.Security.Message.IssuedKeyType = SecurityKeyType.SymmetricKey

  ' Set IssuedTokenType to SAML 1.1
  b.Security.Message.IssuedTokenType = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#samlv1.1"

備註

此屬性表示服務預期的權杖類型,並控制服務要建立哪一種 SecurityTokenAuthenticator。 在用戶端上,它會控制傳送至用戶端要求中發出權杖之安全性權杖服務的類型。

IssuedTokenType 通常採用 URI 形式。

適用於