Sdílet prostřednictvím


<serviceTokenResolver>

Registers the service token resolver that is used by handlers in the token handler collection. The service token resolver is used to resolve the encryption token on incoming tokens and messages.

<configuration>
  <system.identityModel>
    <identityConfiguration>
      <securityTokenHandlers>
        <securityTokenHandlerConfiguration>
          <serviceTokenResolver>

Syntax

<system.identityModel>  
  <identityConfiguration>  
    <securityTokenHandlers>  
      <securityTokenHandlerConfiguration>  
        <serviceTokenResolver type=xs:string>  
        </serviceTokenResolver>  
      </securityTokenHandlerConfiguration>  
    </securityTokenHandlers>  
  </identityConfiguration>  
</system.identityModel>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
type Specifies the type of the service token resolver. Either the SecurityTokenResolver type or a type that derives from the SecurityTokenResolver class. For more information about how to specify the type attribute, see [Custom Type References]. Required.

Child Elements

None

Parent Elements

Element Description
<securityTokenHandlerConfiguration> Provides configuration for a collection of security token handlers.

Remarks

The service token resolver can be used to resolve the encryption token on incoming tokens and messages. It is used to retrieve the key that should be used to decrypt incoming tokens. You must specify the type attribute. The type specified can be either SecurityTokenResolver or a custom type that derives from the SecurityTokenResolver class.

Some token handlers allow you to specify service token resolver settings in configuration. Settings on individual token handlers override those specified on the security token handler collection.

Note

Specifying the <serviceTokenResolver> element as a child element of the <identityConfiguration> element has been deprecated, but is still supported for backward compatibility. Settings on the <securityTokenHandlerConfiguration> element override those on the <identityConfiguration> element.

Example

<serviceTokenResolver type="MyNamespace.CustomTokenResolver, MyAssembly" />