語言

Saml2SecurityTokenHandler.CreateConditions(SecurityTokenDescriptor) 方法

定義

創造了斷言的條件。

protected virtual Microsoft.IdentityModel.Tokens.Saml2.Saml2Conditions CreateConditions(Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member CreateConditions : Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor -> Microsoft.IdentityModel.Tokens.Saml2.Saml2Conditions
override this.CreateConditions : Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor -> Microsoft.IdentityModel.Tokens.Saml2.Saml2Conditions
Protected Overridable Function CreateConditions (tokenDescriptor As SecurityTokenDescriptor) As Saml2Conditions

參數

tokenDescriptor
SecurityTokenDescriptor

包含條件細節。

傳回

一個 Saml2Conditions 物件。

例外狀況

若為 tokenDescriptor 空。

備註

一般而言,主張中應包含條件以限制誤用該主張的影響。 指定 NotBefore 與 NotOnOrAfter 條件可限制斷言受損時的脆弱性時間。 AudienceRestrictionCondition 可用來明確說明該主張的預期依賴方,結合依賴方適當的受眾限制執行,有助於減少依賴方間的偽造攻擊。

預設實作會根據 tokenDescriptor.Lifetime 建立 NotBefore 和 NotOnOrAfter 條件。 同時也會產生一個 AudienceRestrictionCondition,限制斷言的消費範圍為 tokenDescriptor.Scope.Address。

適用於