WindowsSecurityToken Constructor (WindowsIdentity)

 

Initializes a new instance of the WindowsSecurityToken class using the Windows user.

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

public WindowsSecurityToken(
	WindowsIdentity windowsIdentity
)

Parameters

windowsIdentity
Type: System.Security.Principal.WindowsIdentity

A WindowsIdentity that represents a Windows user.

Exception Condition
ArgumentNullException

windowsIdentity is null.

This constructor creates a unique identifier for the WindowsSecurityToken security token and assigns that value to the Id property.

.NET Framework
Available since 3.0
Return to top
Show: