Share via


SecurityTokenService Class

Represents a security token service.

Namespace: Microsoft.Web.Services2.Security
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim securityTokenService1 As New SecurityTokenService()

Syntax

'Declaration
Public Class SecurityTokenService
    Inherits SoapService
public class SecurityTokenService : SoapService
public ref class SecurityTokenService : public SoapService
public class SecurityTokenService extends SoapService
public class SecurityTokenService extends SoapService

Remarks

The Web Services Enhancements for Microsoft .NET (WSE) provide a security token service that issues security context tokens. However, if your application must issue tokens other than security context tokens, derive a class from the SecurityTokenService class to build a security token service. To issue security tokens, you must override the IssueSecurityToken method by adding code to it that creates a new instance of the RequestSecurityTokenResponse class if the security token request is valid.

Security token requests are routed to a security token service based on the request's <To> header and then dispatched to a particular method of that security token service based on the request's <Action> header. The following table lists the <Action> header values and the method they are routed to.

Action

Method

https://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/Issue

IssueSecurityTokenRequest

https://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/Issue

IssueSecurityTokenRequest

https://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/Renew

RenewSecurityTokenRequest

https://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/Renew

RenewSecurityTokenRequest

https://schemas.xmlsoap.org/ws/2004/04/security/trust/RST/Validate

ValidateSecurityTokenRequest

https://schemas.xmlsoap.org/ws/2004/04/security/trust/RSTR/Validate

ValidateSecurityTokenRequest

Once a security token request is dispatched to a method, that method then calls the following methods in the listed order, by default:

  1. VerifyRequestPolicy

  2. IssueSecurityToken

  3. EnforceResponsePolicy

  4. SetupIssuedToken

A security token service issues security tokens that are trusted by one or more target Web services. A SOAP message sender can request a security token from a security token service using the <RequestSecurityToken> element. A security token service responds to the request with a <RequestSecurityTokenResponse> element. If the security token service issues a security token as requested, the response contains that security token. For more information about issuing security tokens, see Issuing Security Tokens.

Inheritance Hierarchy

System.Object
   Microsoft.Web.Services2.Messaging.SoapPort
     Microsoft.Web.Services2.Messaging.SoapReceiver
       Microsoft.Web.Services2.Messaging.SoapService
        Microsoft.Web.Services2.Security.SecurityTokenService
           Microsoft.Web.Services2.Security.SecurityContextTokenService

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

Microsoft.Web.Services2.Security Namespace

Other Resources

SecurityTokenService Members