This documentation is archived and is not being maintained.

UserNameSecurityTokenProvider Constructor

Initializes a new instance of the UserNameSecurityTokenProvider class using the specified username and password.

Namespace:  System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public UserNameSecurityTokenProvider(
	string userName,
	string password


Type: System.String

The username to get UserNameSecurityToken security token for.

Type: System.String

The password of the user to get a UserNameSecurityToken security token for.

The GetTokenCore method gets a token based on the specified username and password.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0