UserNameSecurityToken Constructor (String, String)

 

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: