Breyta

Deila með


WindowsSecurityToken.Initialize Method

Definition

Initializes a new instance of the WindowsSecurityToken class.

Overloads

Initialize(String, DateTime, DateTime, WindowsIdentity, Boolean)

Initializes a new instance of the WindowsSecurityToken class using the specified unique identifier, Windows user, and the first and last instants in time when the security token is valid.

Initialize(String, String, DateTime, DateTime, WindowsIdentity, Boolean)

Initializes a new instance of the WindowsSecurityToken class.

Initialize(String, DateTime, DateTime, WindowsIdentity, Boolean)

Initializes a new instance of the WindowsSecurityToken class using the specified unique identifier, Windows user, and the first and last instants in time when the security token is valid.

protected:
 void Initialize(System::String ^ id, DateTime effectiveTime, DateTime expirationTime, System::Security::Principal::WindowsIdentity ^ windowsIdentity, bool clone);
protected void Initialize (string id, DateTime effectiveTime, DateTime expirationTime, System.Security.Principal.WindowsIdentity windowsIdentity, bool clone);
member this.Initialize : string * DateTime * DateTime * System.Security.Principal.WindowsIdentity * bool -> unit
Protected Sub Initialize (id As String, effectiveTime As DateTime, expirationTime As DateTime, windowsIdentity As WindowsIdentity, clone As Boolean)

Parameters

id
String

A unique identifier for the security token. Sets the value of the Id property.

effectiveTime
DateTime

A DateTime that represents the instant in time at which this security token is first valid. Set the value of the ValidFrom property.

expirationTime
DateTime

A DateTime that represents the last instant in time at which this security token is valid. Sets the value of the ValidTo property.

windowsIdentity
WindowsIdentity

A WindowsIdentity that represents a Windows user. Sets the value of the WindowsIdentity property.

clone
Boolean

true to create a WindowsIdentity object that is identical to the windowsIdentity parameter and assign that to the WindowsIdentity property; otherwise, assign the value of the windowsIdentity parameter to the WindowsIdentity property.

Exceptions

windowsIdentity is null.

-or-

id is null.

Remarks

The Initialize method is called by the constructors for the WindowsSecurityToken class.

Applies to

Initialize(String, String, DateTime, DateTime, WindowsIdentity, Boolean)

Initializes a new instance of the WindowsSecurityToken class.

protected:
 void Initialize(System::String ^ id, System::String ^ authenticationType, DateTime effectiveTime, DateTime expirationTime, System::Security::Principal::WindowsIdentity ^ windowsIdentity, bool clone);
protected void Initialize (string id, string authenticationType, DateTime effectiveTime, DateTime expirationTime, System.Security.Principal.WindowsIdentity windowsIdentity, bool clone);
member this.Initialize : string * string * DateTime * DateTime * System.Security.Principal.WindowsIdentity * bool -> unit
Protected Sub Initialize (id As String, authenticationType As String, effectiveTime As DateTime, expirationTime As DateTime, windowsIdentity As WindowsIdentity, clone As Boolean)

Parameters

id
String

A unique identifier for the security token.

authenticationType
String

The authentication type for the security token.

effectiveTime
DateTime

A DateTime that represents the instant in time at which this security token is first valid.

expirationTime
DateTime

A DateTime that represents the last instant in time at which this security token is valid.

windowsIdentity
WindowsIdentity

Represents a Windows user.

clone
Boolean

true to create a WindowsIdentity object that is identical to the windowsIdentity parameter and assign that to the WindowsIdentity property; otherwise, assign the value of the windowsIdentity parameter to the WindowsIdentity property.

Applies to