Partager via


UsernameTokenManager.AuthenticateToken Method

Authenticates a UsernameToken .

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

Usage

'Usage
Public Class usernameTokenManagerImplementation
    Inherits UsernameTokenManager
        Protected Overrides Function AuthenticateToken(token As UsernameToken)
            MyBase.AuthenticateToken(token)
        End Function
End Class

Syntax

'Declaration
Protected Overridable Function AuthenticateToken( _
    ByVal token As UsernameToken _
) As String
protected virtual string AuthenticateToken(
    UsernameToken token
);
protected:
virtual String^ AuthenticateToken(
    UsernameToken^ token
);
protected virtual System.String AuthenticateToken(
    UsernameToken token
);
protected function AuthenticateToken(
     token : UsernameToken
) : String;

Parameters

Return Value

The password of the authenticated UsernameToken .

Exceptions

Exception type Condition
SecurityFault

The Password property of token is null .

Remarks

The default implementation authenticates the token parameter against a local Windows account or an Active Directory using the Username and Password properties of the UsernameToken . If the authentication is successful, the Principal property of the UsernameToken is set to a WindowsPrincipal that represents the authenticated user.

WSE calls the VerifyToken method for each UsernameToken contained in an incoming SOAP message after it has been deserialized. The VerifyToken method calls the AuthenticateToken method to get the password for the user. The AuthenticateToken method verifies the user name and password in the SOAP message by calling the LogonUser Win32 function.

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 Class
UsernameTokenManager Members
Microsoft.Web.Services3.Security.Tokens Namespace
UsernameToken
OnLogonUserFailed

Other Resources

<securityTokenManager> Element