SamlSecurityTokenHandler 類別

定義

表示會從 SAML 1.1 判斷提示建立安全性權杖的安全性權杖處理常式。

public ref class SamlSecurityTokenHandler : System::IdentityModel::Tokens::SecurityTokenHandler
public class SamlSecurityTokenHandler : System.IdentityModel.Tokens.SecurityTokenHandler
type SamlSecurityTokenHandler = class
    inherit SecurityTokenHandler
Public Class SamlSecurityTokenHandler
Inherits SecurityTokenHandler
繼承
SamlSecurityTokenHandler

備註

類別會將 SamlSecurityTokenHandler SAML 1.1 判斷提示所支援的安全性令牌串行化和還原串行化為 SamlSecurityToken 物件。 安全性令牌處理程式負責建立、讀取、寫入和驗證令牌。

您可以將 類別的 SamlSecurityTokenHandler 實例新增至 SecurityTokenHandlerCollection 針對服務 (或應用程式) 所設定的 物件,將安全性令牌服務 (STS) 或信賴憑證者 (RP) 應用程式,以處理 SAML 1.1 判斷提示支援的安全性令牌。 這可以透過程序設計方式或在組態檔中完成。 當集合新增至集合時,處理程式本身會透過集合的 Configuration 屬性,從為集合指定的組態進行設定。 雖然您可以藉由設定其 Configuration 屬性個別設定處理程式,但這通常並非必要;不過,如果必須個別設定處理程式,則在將處理程式新增至集合之後,應該設定 屬性。

在許多情況下, SamlSecurityTokenHandler 類別可以依原樣使用;不過,類別會透過公開的方法提供許多擴充點。 藉由衍生自 SamlSecurityTokenHandler 和 覆寫特定方法,您可以修改預設實作中提供的令牌處理功能,或將延伸模組的處理新增至某些自定義案例中可能需要的 SAML 判斷提示規格。

建構函式

SamlSecurityTokenHandler()

使用預設安全性權杖需求,初始化 SamlSecurityTokenHandler 類別的新執行個體。

SamlSecurityTokenHandler(SamlSecurityTokenRequirement)

使用指定的安全性權杖需求,初始化 SamlSecurityTokenHandler 類別的新執行個體。

欄位

Assertion

urn:oasis:names:tc:SAML:1.0:assertion。

BearerConfirmationMethod

urn:oasis:names:tc:SAML:1.0:cm:bearer。

Namespace

urn:oasis:names:tc:SAML:1.0

UnspecifiedAuthenticationMethod

urn:oasis:names:tc:SAML:1.0:am:unspecified。

屬性

CanValidateToken

取得值,指出這個處理常式是否可驗證 SamlSecurityToken 型別的權杖。

CanWriteToken

取得值,指出這個處理常式是否可序列化 SamlSecurityToken 型別的權杖。

CertificateValidator

取得或設定目前執行個體用來驗證 X.509 憑證的 X.509 憑證驗證程式。

Configuration

取得或設定為目前執行個體提供組態的 SecurityTokenHandlerConfiguration 物件。

(繼承來源 SecurityTokenHandler)
ContainingCollection

取得包含目前執行個體的權杖處理常式集合。

(繼承來源 SecurityTokenHandler)
KeyInfoSerializer

取得或設定用來序列化和還原序列化金鑰識別項的安全性權杖序列化程式。

SamlSecurityTokenRequirement

取得或設定這個執行個體的安全性權杖需求。

TokenType

取得這個處理常式所支援的語彙基元型別。

方法

AddDelegateToAttributes(ClaimsIdentity, ICollection<SamlAttribute>, SecurityTokenDescriptor)

將與 ActAs 主題關聯的所有委派加入至屬性集合中。

CanReadKeyIdentifierClause(XmlReader)

傳回值,這個值表示指定的 XML 讀取器所參考的 XML 項目是否為此執行個體可還原序列化的金鑰識別項子句。

(繼承來源 SecurityTokenHandler)
CanReadToken(String)

傳回值,這個值表示指定的字串是否可還原序列化為此執行個體所處理的型別語彙基元。

(繼承來源 SecurityTokenHandler)
CanReadToken(XmlReader)

指出是否可讀取目前的 XML 項目當做這個執行個體所處理型別的權杖。

CanWriteKeyIdentifierClause(SecurityKeyIdentifierClause)

傳回值,指出這個執行個體是否能夠序列化指定的金鑰識別碼子句。

(繼承來源 SecurityTokenHandler)
CollectAttributeValues(ICollection<SamlAttribute>)

將具有一般宣告型別、宣告實值型別及原始簽發者的屬性收集到有多個值的單一屬性。

CreateAdvice(SecurityTokenDescriptor)

在衍生類別中覆寫時,建立判斷提示的 SamlAdvice 物件。

CreateAssertion(String, SamlConditions, SamlAdvice, IEnumerable<SamlStatement>)

使用指定的簽發者、條件、建議和陳述式,建立 SamlAssertion 物件。 您可以覆寫這個方法以自訂用來建立表示判斷提示的參數。

CreateAttribute(Claim, SecurityTokenDescriptor)

建立宣告的 SamlAttribute 物件。

CreateAttributeStatement(SamlSubject, ClaimsIdentity, SecurityTokenDescriptor)

從權杖描述元建立 SamlAttributeStatement 物件。

CreateAuthenticationStatement(SamlSubject, AuthenticationInformation, SecurityTokenDescriptor)

從指定的驗證資訊建立 SAML 1.1 驗證陳述式。

CreateClaims(SamlSecurityToken)

從 SAML 1.1 權杖建立宣告。

CreateConditions(Lifetime, String, SecurityTokenDescriptor)

建立判斷提示的條件。

CreateSamlSubject(SecurityTokenDescriptor)

建立判斷提示的 SAML 1.1 主題。

CreateSecurityTokenReference(SecurityToken, Boolean)

建立權杖未附加至訊息時的安全性權杖參考。

CreateStatements(SecurityTokenDescriptor)

建立要包含在判斷提示中的 SAML 1.1 陳述式。

CreateToken(SecurityTokenDescriptor)

以權杖描述元為基礎建立安全性權杖。

CreateWindowsIdentity(String)

指定的使用者主要名稱 (UPN),建立 WindowsIdentity 物件。

CreateXmlStringFromAttributes(IEnumerable<SamlAttribute>)

從表示動作項目之 SAML 1.1 屬性的集合中建置 XML 格式化字串。

DenormalizeAuthenticationType(String)

傳回 SAML11 驗證方法識別項,該識別項符合 SAML 驗證方法的指定標準化值。

DetectReplayedToken(SecurityToken)

如果語彙基元重新執行快取中已存在指定的語彙基元,會擲回例外狀況,否則語彙基元會加入至快取。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
FindUpn(ClaimsIdentity)

尋找指定之 ClaimsIdentity 物件中的 UPN 宣告值,以便用來將識別對應至 WindowsIdentity 物件。

GetEncryptingCredentials(SecurityTokenDescriptor)

取得權杖加密認證。 覆寫這個方法,以變更權杖加密認證。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetSigningCredentials(SecurityTokenDescriptor)

取得用於簽署判斷提示之認證。

GetTokenReplayCacheEntryExpirationTime(SamlSecurityToken)

傳回權杖保存在權杖重新執行快取中的有效期間。

GetTokenTypeIdentifiers()

取得這個處理常式所支援的語彙基元型別識別項。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
LoadCustomConfiguration(XmlNodeList)

從 XML 載入自訂組態。

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
NormalizeAuthenticationType(String)

傳回符合 SAML1.1 驗證方法識別項的標準化值。

ProcessAttributeStatement(SamlAttributeStatement, ClaimsIdentity, String)

從 SAML 1.1 屬性陳述式建立宣告,並將這些宣告新增至指定的主體。

ProcessAuthenticationStatement(SamlAuthenticationStatement, ClaimsIdentity, String)

從 SAML 1.1 驗證陳述式建立宣告,並將這些宣告新增至指定的主體。

ProcessAuthorizationDecisionStatement(SamlAuthorizationDecisionStatement, ClaimsIdentity, String)

從 SAML 1.1 授權決策陳述式建立宣告,並將這些宣告新增至指定的主體。

ProcessSamlSubject(SamlSubject, ClaimsIdentity, String)

從 SAML 1.1 主體建立宣告,並將這些宣告新增至指定的主體。

ProcessStatement(IList<SamlStatement>, ClaimsIdentity, String)

從 SAML 1.1 陳述式的集合建立宣告,並將這些宣告新增至指定的主體。

ReadAction(XmlReader)

讀取 <saml:Action> 項目。

ReadAdvice(XmlReader)

讀取 <saml:Advice> 項目。

ReadAssertion(XmlReader)

讀取 <saml:Assertion> 項目。

ReadAttribute(XmlReader)

讀取 <saml:Attribute> 項目。

ReadAttributeStatement(XmlReader)

讀取 <saml:AttributeStatement> 項目或指定 saml:AttributeStatementType 之 xsi:type 的 <saml:Statement> 項目。

ReadAttributeValue(XmlReader, SamlAttribute)

讀取屬性值。

ReadAudienceRestrictionCondition(XmlReader)

從指定的 XML 讀取器讀取 <saml:AudienceRestrictionCondition> 項目。

ReadAuthenticationStatement(XmlReader)

讀取 <saml:AuthnStatement> 項目或指定 saml:AuthnStatementType 之 xsi:type 的 <saml:Statement> 項目。

ReadAuthorityBinding(XmlReader)

讀取 <saml:AuthorityBinding> 項目。

ReadAuthorizationDecisionStatement(XmlReader)

讀取 <saml:AuthzDecisionStatement> 項目或指定 saml:AuthzDecisionStatementType 之 xsi:type 的 <saml:Statement> 項目。

ReadCondition(XmlReader)

從指定的讀取器讀取 saml:AudienceRestrictionCondition 或 saml:DoNotCacheCondition。

ReadConditions(XmlReader)

讀取 <saml:Conditions> 項目。

ReadDoNotCacheCondition(XmlReader)

從指定的 XML 讀取器讀取 saml:DoNotCacheCondition 元素。

ReadEvidence(XmlReader)

讀取 <saml:Evidence> 項目。

ReadKeyIdentifierClause(XmlReader)

在衍生類別中覆寫時,將指定 XML 讀取器所參考的 XML 還原序列化為參考該衍生類別所處理之權仗的索引鍵識別項子句。

(繼承來源 SecurityTokenHandler)
ReadSigningKeyInfo(XmlReader, SamlAssertion)

還原序列化 SAML 簽署 KeyInfo。

ReadStatement(XmlReader)

讀取 <saml:Statement> 項目。

ReadSubject(XmlReader)

讀取 <saml:Subject> 項目。

ReadSubjectKeyInfo(XmlReader)

將 SAML Subject <ds:KeyInfo> 項目還原序列化。

ReadToken(String)

在衍生類別中覆寫時,將指定字串還原序列化為該衍生類別所處理之類型的權仗。

(繼承來源 SecurityTokenHandler)
ReadToken(XmlReader)

自指定的資料流讀取 SAML 1.1 權杖。

ReadToken(XmlReader, SecurityTokenResolver)

在衍生類別中覆寫時,使用指定的權仗解析程式,將指定 XML 讀取器所參考的 XML 還原序列化為權杖,此權杖的型別由該衍生類別處理。

(繼承來源 SecurityTokenHandler)
ResolveIssuerToken(SamlAssertion, SecurityTokenResolver)

將簽署金鑰識別碼解析為 SecurityToken

ResolveSubjectKeyIdentifier(SecurityKeyIdentifier)

解析 saml:Subject 項目中指定的 SecurityKeyIdentifier

SetDelegateFromAttribute(SamlAttribute, ClaimsIdentity, String)

當偵測到一種特殊型別的 SamlAttribute,就會呼叫這個方法。 SamlAttribute 透過包裝傳遞 SamlAttribute,其包含屬性值集合 (在 AttributeValues 屬性中),其中每一個將對應到宣告。 所有宣告都會在 ClaimsIdentity 中與指定的簽發者一起傳回。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
TraceTokenValidationFailure(SecurityToken, String)

當啟用追蹤時,在安全性權杖驗證期間追蹤失敗事件。

(繼承來源 SecurityTokenHandler)
TraceTokenValidationSuccess(SecurityToken)

當啟用追蹤時,追蹤安全性權杖驗證成功事件。

(繼承來源 SecurityTokenHandler)
TryResolveIssuerToken(SamlAssertion, SecurityTokenResolver, SecurityToken)

將簽署金鑰識別碼解析為 SecurityToken。

ValidateConditions(SamlConditions, Boolean)

驗證指定的 SamlConditions 物件。

ValidateToken(SecurityToken)

驗證權杖資料,並傳回其宣告。

WriteAction(XmlWriter, SamlAction)

寫入 <saml:Action> 項目。

WriteAdvice(XmlWriter, SamlAdvice)

寫入 <saml:Advice> 項目。

WriteAssertion(XmlWriter, SamlAssertion)

將指定的 SAML 判斷提示序列化至指定的 XML 寫入器。

WriteAttribute(XmlWriter, SamlAttribute)

寫入 <saml:Attribute> 項目。

WriteAttributeStatement(XmlWriter, SamlAttributeStatement)

寫入 <saml:AttributeStatement> 項目。

WriteAttributeValue(XmlWriter, String, SamlAttribute)

寫入 saml:Attribute 值。

WriteAudienceRestrictionCondition(XmlWriter, SamlAudienceRestrictionCondition)

寫入 <saml:AudienceRestriction> 項目。

WriteAuthenticationStatement(XmlWriter, SamlAuthenticationStatement)

寫入 <saml:AuthnStatement> 項目。

WriteAuthorityBinding(XmlWriter, SamlAuthorityBinding)

寫入 <saml:AuthorityBinding> 項目。

WriteAuthorizationDecisionStatement(XmlWriter, SamlAuthorizationDecisionStatement)

寫入 <saml:AuthzDecisionStatement> 項目。

WriteCondition(XmlWriter, SamlCondition)

序列化指定的 SamlCondition 物件。

WriteConditions(XmlWriter, SamlConditions)

寫入 <saml:Conditions> 項目。

WriteDoNotCacheCondition(XmlWriter, SamlDoNotCacheCondition)

寫入 <saml:DoNotCacheCondition> 項目。

WriteEvidence(XmlWriter, SamlEvidence)

寫入 <saml:Evidence> 項目。

WriteKeyIdentifierClause(XmlWriter, SecurityKeyIdentifierClause)

在衍生類別中覆寫時,將指定的金鑰識別碼子句序列化為 XML。 金鑰識別項子句必須是衍生類別所支援的型別。

(繼承來源 SecurityTokenHandler)
WriteSigningKeyInfo(XmlWriter, SecurityKeyIdentifier)

使用指定的 XML 寫入器寫入 Signing <ds:KeyInfo> 項目。

WriteStatement(XmlWriter, SamlStatement)

寫入 SamlStatement。

WriteSubject(XmlWriter, SamlSubject)

寫入 <saml:Subject> 項目。

WriteSubjectKeyInfo(XmlWriter, SecurityKeyIdentifier)

使用指定的 XML 寫入器將 Subject <ds:KeyInfo> 項目序列化。

WriteToken(SecurityToken)

在衍生類別中覆寫時,將指定的安全性權杖序列化為字串。 權杖必須是由衍生類別所處理的型別。

(繼承來源 SecurityTokenHandler)
WriteToken(XmlWriter, SecurityToken)

將 SAML 權杖寫入指定的 XML 寫入器。

適用於

另請參閱