UserNameSecurityToken Constructor (String, String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the UserNameSecurityToken class using the specified user name and password.

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

public UserNameSecurityToken(
	string userName,
	string password
)

Parameters

userName
Type: System.String

A user name. Sets the UserName property.

password
Type: System.String

A password for the user name. Sets the Password property.

Exception Condition
ArgumentNullException

userName is null.

-or-

password is null.

.NET Framework
Available since 3.0
Return to top
Show: