WindowsSecurityToken.Initialize 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 WindowsSecurityToken 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| Initialize(String, DateTime, DateTime, WindowsIdentity, Boolean) |
使用指定的唯一标识符、Windows 用户以及安全令牌有效时的第一个和最后一个即时初始化类的新实例 WindowsSecurityToken 。 |
| Initialize(String, String, DateTime, DateTime, WindowsIdentity, Boolean) |
初始化 WindowsSecurityToken 类的新实例。 |
Initialize(String, DateTime, DateTime, WindowsIdentity, Boolean)
使用指定的唯一标识符、Windows 用户以及安全令牌有效时的第一个和最后一个即时初始化类的新实例 WindowsSecurityToken 。
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)
参数
- windowsIdentity
- WindowsIdentity
一 WindowsIdentity 个表示 Windows 用户。 设置属性的值 WindowsIdentity 。
- clone
- Boolean
true 如果创建 WindowsIdentity 与参数相同的 windowsIdentity 对象,并将该 WindowsIdentity 对象分配给该属性,则为该对象赋值;否则,请将 windowsIdentity 参数的值分配给该 WindowsIdentity 属性。
例外
注解
该方法 Initialize 由类的 WindowsSecurityToken 构造函数调用。
适用于
Initialize(String, String, DateTime, DateTime, WindowsIdentity, Boolean)
初始化 WindowsSecurityToken 类的新实例。
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)
参数
- id
- String
安全令牌的唯一标识符。
- authenticationType
- String
安全令牌的身份验证类型。
- windowsIdentity
- WindowsIdentity
表示Windows用户。
- clone
- Boolean
true 如果创建 WindowsIdentity 与参数相同的 windowsIdentity 对象,并将该 WindowsIdentity 对象分配给该属性,则为该对象赋值;否则,请将 windowsIdentity 参数的值分配给该 WindowsIdentity 属性。