Condividi tramite


How to: Configure the Security Token Manager for a Custom Security Token

After a security token manager has been created for a custom XML security token, it must be configure to specify the security token manager that WSE should call when WSE receives a SOAP message that contains a security token not natively supported by WSE.

To configure a security token manager for a custom XML security token

  1. Add a <securityTokenManager> Element element to the configuration file for the SOAP message sender.

    The following code example specifies that the security token manager for contoso:Token security tokens is the CustomXmlSecToken.XmlTokenManager type.

    <configuration>
        <configSections>
            <section name="microsoft.web.services3"
                     type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </configSections>
    
        <microsoft.web.services3>
            <security>
                <securityTokenManager>
                   <add localName="Token"
                        type="CustomXmlSecToken.XmlTokenManager, CustomXmlSecToken"
                        namespace="https://www.contoso.com/tokens/customXml"/>
                </securityTokenManager> 
            </security>
        </microsoft.web.services3>
    </configuration>
    

    Note

    Before adding the <securityTokenManager> Element element, the microsoft.web.services3 configuration handler must be registered by using the <section> Element element.

See Also

Tasks

How to: Create a Security Token Manager for a Custom Security Token

Reference

<securityTokenManager> Element
<section> Element

Other Resources

Creating Custom Security Tokens