Partager via


<serviceToken> Element

Specifies the security token that a security token service uses to encrypt the session key in the response for a security token request.

<microsoft.web.services3> Element
  <tokenIssuer> Element

<serviceToken>
    <KeyInfo>
    </KeyInfo> 
</serviceToken>

Attributes and Elements

Attributes

None

Child Elements

Element Description

<KeyInfo> Element

Required element. Specifies the security token to encrypt the session key.

Parent Elements

Element Description

<tokenIssuer> Element

Specifies the settings for a security token service.

Remarks

Use the <serviceToken> element when you issue security tokens, including SecurityContextToken security tokens. For more details about issuing security tokens, see Establishing a Secure Conversation.

Before adding the <serviceToken> element to a configuration file, you must add the microsoft.web.services3 configuration section handler to the configuration file. For details about adding the microsoft.web.services3 configuration section handler, see <section> Element.

Example

The following code example specifies an X509SecurityToken with a specific key to sign the responses for security token requests.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <microsoft.web.services3>
    <tokenIssuer>
      <serviceToken>
        <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
          <wsse:SecurityTokenReference 
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">
              ZPGrPnuqATeSgVjLYcmiY/GSWWY=
            </wsse:KeyIdentifier>
          </wsse:SecurityTokenReference>
        </KeyInfo>
      </serviceToken>
    </tokenIssuer>
  </microsoft.web.services3>
</configuration>

See Also

Reference

<tokenIssuer> Element
<KeyIdentifier> Element

Other Resources

Establishing a Secure Conversation