SamlSecurityTokenHandler Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a security token handler that creates security tokens from SAML 1.1 Assertions.
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
- Inheritance
The SamlSecurityTokenHandler class serializes and deserializes security tokens backed by SAML 1.1 Assertions into SamlSecurityToken objects. Security token handlers are responsible for creating, reading, writing, and validating tokens.
You can configure a security token service (STS) or relying party (RP) application to process SAML 1.1 Assertion-backed security tokens by adding an instance of the SamlSecurityTokenHandler class to the SecurityTokenHandlerCollection object configured for the service (or application). This can be done either programmatically or in the configuration file. The handler itself is configured from the configuration specified for the collection through the collection's Configuration property when it is added to the collection. While it is possible to configure the handler individually by setting its Configuration property, this is not normally necessary; however, if the handler must be configured individually, the property should be set after the handler is added to the collection.
For many scenarios, the SamlSecurityTokenHandler class can be used as-is; however, the class provides many extension points through the methods it exposes. By deriving from the SamlSecurityTokenHandler and overriding specific methods, you can modify the functionality of the token processing provided in the default implementation, or you can add processing for extensions to the SAML Assertion specification that may be needed in some custom scenarios.
Saml |
Initializes a new instance of the SamlSecurityTokenHandler class with default security token requirements. |
Saml |
Initializes a new instance of the SamlSecurityTokenHandler class with the specified security token requirements. |
Assertion |
urn:oasis:names:tc:SAML:1.0:assertion. |
Bearer |
urn:oasis:names:tc:SAML:1.0:cm:bearer. |
Namespace |
urn:oasis:names:tc:SAML:1.0 |
Unspecified |
urn:oasis:names:tc:SAML:1.0:am:unspecified. |
Can |
Gets a value that indicates if this handler can validate tokens of type SamlSecurityToken. |
Can |
Gets a value that indicates whether this handler can serialize tokens of type SamlSecurityToken. |
Certificate |
Gets or sets the X.509 certificate validator that is used by the current instance to validate X.509 certificates. |
Configuration |
Gets or sets the SecurityTokenHandlerConfiguration object that provides configuration for the current instance. (Inherited from SecurityTokenHandler) |
Containing |
Gets the token handler collection that contains the current instance. (Inherited from SecurityTokenHandler) |
Key |
Gets or sets the security token serializer that is used to serialize and deserialize key identifiers. |
Saml |
Gets or sets the security token requirements for this instance. |
Token |
Gets the token type supported by this handler. |
Add |
Adds all of the delegates associated with the ActAs subject into the attribute collection. |
Can |
Returns a value that indicates whether the XML element referred to by the specified XML reader is a key identifier clause that can be deserialized by this instance. (Inherited from SecurityTokenHandler) |
Can |
Returns a value that indicates whether the specified string can be deserialized as a token of the type processed by this instance. (Inherited from SecurityTokenHandler) |
Can |
Indicates whether the current XML element can be read as a token of the type handled by this instance. |
Can |
Returns a value that indicates whether the specified key identifier clause can be serialized by this instance. (Inherited from SecurityTokenHandler) |
Collect |
Collects attributes with a common claim type, claim value type, and original issuer into a single attribute with multiple values. |
Create |
When overridden in a derived class, creates a SamlAdvice object for the assertion. |
Create |
Creates a SamlAssertion object by using the specified issuer, conditions, advice and statements. You can override this method to customize the parameters used to create the assertion. |
Create |
Creates a SamlAttribute object from a claim. |
Create |
Creates a SamlAttributeStatement object from a token descriptor. |
Create |
Creates a SAML 1.1 authentication statement from the specified authentication information. |
Create |
Creates claims from a SAML 1.1 token. |
Create |
Creates the conditions for the assertion. |
Create |
Creates a SAML 1.1 subject for the assertion. |
Create |
Creates the security token reference when the token is not attached to the message. |
Create |
Creates SAML 1.1 statements to be included in the assertion. |
Create |
Creates a security token based on a token descriptor. |
Create |
Creates a WindowsIdentity object using the specified User Principal Name (UPN). |
Create |
Builds an XML formatted string from a collection of SAML 1.1 attributes that represent the Actor. |
Denormalize |
Returns the SAML11 authentication method identifier that matches the specified normalized value for a SAML authentication method. |
Detect |
Throws an exception if the specified token already exists in the token replay cache; otherwise the token is added to the cache. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Find |
Finds the UPN claim value in the specified ClaimsIdentity object for the purpose of mapping the identity to a WindowsIdentity object. |
Get |
Gets the token encrypting credentials. Override this method to change the token encrypting credentials. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the credentials for signing the assertion. |
Get |
Returns the time until which the token should be held in the token replay cache. |
Get |
Gets the token type identifier(s) supported by this handler. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Load |
Loads custom configuration from XML. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Normalize |
Returns the normalized value that matches a SAML 1.1 authentication method identifier. |
Process |
Creates claims from a SAML 1.1 attribute statement and adds them to the specified subject. |
Process |
Creates claims from a SAML 1.1 authentication statement and adds them to the specified subject. |
Process |
Creates claims from a SAML 1.1 authorization decision statement and adds them to the specified subject. |
Process |
Creates claims from the SAML 1.1 subject and adds them to the specified subject. |
Process |
Creates claims from a collection of SAML 1.1 statements and adds them to the specified subject. |
Read |
Reads the <saml:Action> element. |
Read |
Reads the <saml:Advice> element. |
Read |
Reads the <saml:Assertion> element. |
Read |
Reads the <saml:Attribute> element. |
Read |
Reads the <saml:AttributeStatement> element, or a <saml:Statement> element that specifies an xsi:type of saml:AttributeStatementType. |
Read |
Reads an attribute value. |
Read |
Reads the <saml:AudienceRestrictionCondition> element from the specified XML reader. |
Read |
Reads the <saml:AuthnStatement> element or a <saml:Statement> element that specifies an xsi:type of saml:AuthnStatementType. |
Read |
Read the <saml:AuthorityBinding> element. |
Read |
Reads the <saml:AuthzDecisionStatement> element or a <saml:Statement> element that specifies an xsi:type of saml:AuthzDecisionStatementType. |
Read |
Reads a saml:AudienceRestrictionCondition or a saml:DoNotCacheCondition from the specified reader. |
Read |
Reads the <saml:Conditions> element. |
Read |
Reads a saml:DoNotCacheCondition element from the specified XML reader. |
Read |
Reads the <saml:Evidence> element. |
Read |
When overridden in a derived class, deserializes the XML referenced by the specified XML reader to a key identifier clause that references a token processed by the derived class. (Inherited from SecurityTokenHandler) |
Read |
Deserializes the SAML Signing KeyInfo. |
Read |
Reads the <saml:Statement> element. |
Read |
Reads the <saml:Subject> element. |
Read |
Deserializes the SAML Subject <ds:KeyInfo> element. |
Read |
When overridden in a derived class, deserializes the specified string to a token of the type processed by the derived class. (Inherited from SecurityTokenHandler) |
Read |
When overridden in a derived class, deserializes the XML referenced by the specified XML reader to a token of the type processed by the derived class by using the specified token resolver. (Inherited from SecurityTokenHandler) |
Read |
Reads a SAML 1.1 token from the specified stream. |
Resolve |
Resolves the Signing Key Identifier to a SecurityToken. |
Resolve |
Resolves the SecurityKeyIdentifier specified in a saml:Subject element. |
Set |
This method gets called when a special type of SamlAttribute is detected. The SamlAttribute passed in wraps a SamlAttribute that contains a collection of attribute values (in the AttributeValues property), each of which will get mapped to a claim. All of the claims will be returned in an ClaimsIdentity with the specified issuer. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Trace |
Traces the failure event during the validation of security tokens when tracing is enabled. (Inherited from SecurityTokenHandler) |
Trace |
Traces the successful validation of security tokens event when tracing is enabled. (Inherited from SecurityTokenHandler) |
Try |
Resolves the Signing Key Identifier to a SecurityToken. |
Validate |
Validates the specified SamlConditions object. |
Validate |
Validates the token data and returns its claims. |
Write |
Writes the <saml:Action> element. |
Write |
Writes the <saml:Advice> element. |
Write |
Serializes the specified SAML assertion to the specified XML writer. |
Write |
Writes the <saml:Attribute> element. |
Write |
Writes the <saml:AttributeStatement> element. |
Write |
Writes the saml:Attribute value. |
Write |
Writes the <saml:AudienceRestriction> element. |
Write |
Writes the <saml:AuthnStatement> element. |
Write |
Writes the <saml:AuthorityBinding> element. |
Write |
Writes the <saml:AuthzDecisionStatement> element. |
Write |
Serializes the specified SamlCondition object. |
Write |
Writes the <saml:Conditions> element. |
Write |
Writes the <saml:DoNotCacheCondition> element. |
Write |
Writes the <saml:Evidence> element. |
Write |
When overridden in a derived class, serializes the specified key identifier clause to XML. The key identifier clause must be of the type supported by the derived class. (Inherited from SecurityTokenHandler) |
Write |
Writes the Signing <ds:KeyInfo> element using the specified XML writer. |
Write |
Writes a SamlStatement. |
Write |
Writes the <saml:Subject> element. |
Write |
Serializes the Subject <ds:KeyInfo> element using the specified XML writer. |
Write |
When overridden in a derived class, serializes the specified security token to a string. The token must be of the type processed by the derived class. (Inherited from SecurityTokenHandler) |
Write |
Writes a Saml Token to the specified XML writer. |
Продукт | Версии |
---|---|
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: