WindowsSecurityToken Constructors

Definition

Initializes a new instance of the WindowsSecurityToken class.

Overloads

WindowsSecurityToken()

Initializes a new instance of the WindowsSecurityToken class.

WindowsSecurityToken(WindowsIdentity)

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

WindowsSecurityToken(WindowsIdentity, String)

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

WindowsSecurityToken(WindowsIdentity, String, String)

Creates a new instance of WindowsSecurityToken.

WindowsSecurityToken()

Initializes a new instance of the WindowsSecurityToken class.

C#
protected WindowsSecurityToken();

Remarks

This constructor does nothing, by default.

Applies to

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

WindowsSecurityToken(WindowsIdentity)

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

C#
public WindowsSecurityToken(System.Security.Principal.WindowsIdentity windowsIdentity);

Parameters

windowsIdentity
WindowsIdentity

A WindowsIdentity that represents a Windows user.

Exceptions

windowsIdentity is null.

Remarks

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

Applies to

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

WindowsSecurityToken(WindowsIdentity, String)

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

C#
public WindowsSecurityToken(System.Security.Principal.WindowsIdentity windowsIdentity, string id);

Parameters

windowsIdentity
WindowsIdentity

A WindowsIdentity that represents a Windows user.

id
String

A unique identifier for the security token.

Exceptions

windowsIdentity is null.

-or-

id is null.

Remarks

This constructor calls the Initialize method to initialize the properties of this class.

Applies to

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

WindowsSecurityToken(WindowsIdentity, String, String)

Creates a new instance of WindowsSecurityToken.

C#
public WindowsSecurityToken(System.Security.Principal.WindowsIdentity windowsIdentity, string id, string authenticationType);

Parameters

windowsIdentity
WindowsIdentity

A WindowsIdentity that represents a Windows user.

id
String

A unique identifier for the security token.

authenticationType
String

The authentication type for the security token.

Applies to

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1