共用方式為


ClaimsPrincipal.AddIdentity(ClaimsIdentity) 方法

定義

將指定的宣告識別加入這個宣告主體。

public:
 virtual void AddIdentity(System::Security::Claims::ClaimsIdentity ^ identity);
[System.Security.SecurityCritical]
public virtual void AddIdentity (System.Security.Claims.ClaimsIdentity identity);
public virtual void AddIdentity (System.Security.Claims.ClaimsIdentity identity);
[<System.Security.SecurityCritical>]
abstract member AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
override this.AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
abstract member AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
override this.AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
Public Overridable Sub AddIdentity (identity As ClaimsIdentity)

參數

identity
ClaimsIdentity

要加入的宣告識別。

屬性

例外狀況

identitynull

備註

身分識別會新增至 Identities 集合。

適用於