Share via


UsernameTokenManager Class

Represents a security token manager for UsernameToken security tokens.

Namespace: Microsoft.Web.Services3.Security.Tokens
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim usernameTokenManager1 As New UsernameTokenManager()

Syntax

'Declaration
Public Class UsernameTokenManager
    Inherits SecurityTokenManager
public class UsernameTokenManager : SecurityTokenManager
public ref class UsernameTokenManager : SecurityTokenManager
public class UsernameTokenManager extends SecurityTokenManager
public class UsernameTokenManager extends SecurityTokenManager

Remarks

This class is used to parse UsernameToken security tokens within incoming SOAP messages. WSE provides a default implementation that authenticates all UsernameToken security tokens in a received SOAP message against a Windows account. WSE calls the Win32 LogonUser function for this authentication. If it succeeds, a Windows principal is assigned to the Principal property of the UsernameToken .

To use the default UsernameTokenManager to parse UsernameToken security tokens on Windows XP and Windows 2000, the user account that the ASPNET account runs under must be given the Log on locally permission. This is because WSE calls LogonUser using the user name and password found in the UsernameToken .

When you do not want the WSE to authenticate the UsernameToken against a Windows account, derive a class from UsernameTokenManager and override the AuthenticateToken method. Then register your derived class in the configuration file using the Type attribute of the <securityTokenManager> element. For more information, see <securityTokenManager> Element.

Note

The UsernameTokenManager does not impersonate on the current thread with the credentials found in the UsernameToken .

Inheritance Hierarchy

System.Object
   Microsoft.Web.Services3.Security.Tokens.SecurityTokenManager
    Microsoft.Web.Services3.Security.Tokens.UsernameTokenManager

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 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

UsernameTokenManager Members
Microsoft.Web.Services3.Security.Tokens Namespace
UsernameToken

Other Resources

<securityTokenManager> Element