SecurityTokenParameters Class
Specifies an abstract class that when implemented represents security token parameters.
System.ServiceModel.Security.Tokens.SecurityTokenParameters
System.ServiceModel.Security.Tokens.IssuedSecurityTokenParameters
System.ServiceModel.Security.Tokens.KerberosSecurityTokenParameters
System.ServiceModel.Security.Tokens.RsaSecurityTokenParameters
System.ServiceModel.Security.Tokens.SecureConversationSecurityTokenParameters
System.ServiceModel.Security.Tokens.SslSecurityTokenParameters
System.ServiceModel.Security.Tokens.SspiSecurityTokenParameters
System.ServiceModel.Security.Tokens.UserNameSecurityTokenParameters
System.ServiceModel.Security.Tokens.X509SecurityTokenParameters
Namespace: System.ServiceModel.Security.Tokens
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The SecurityTokenParameters type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | SecurityTokenParameters() | Initializes a new instance of the SecurityTokenParameters class. |
![]() | SecurityTokenParameters(SecurityTokenParameters) | Initializes a new instance of the SecurityTokenParameters class from another instance. |
| Name | Description | |
|---|---|---|
![]() | HasAsymmetricKey | When overridden in a derived class, gets a value that indicates whether the token has an asymmetric key. |
![]() | InclusionMode | Gets or sets the token inclusion requirements. |
![]() | ReferenceStyle | Gets or sets the token reference style. |
![]() | RequireDerivedKeys | Gets or sets a value that indicates whether keys can be derived from the original proof keys. |
![]() | SupportsClientAuthentication | When overridden in a derived class, gets a value that indicates whether the token supports client authentication. |
![]() | SupportsClientWindowsIdentity | When overridden in a derived class, gets a value that indicates whether the token supports a Windows identity for authentication. |
![]() | SupportsServerAuthentication | When overridden in a derived class, gets a value that indicates whether the token supports server authentication. |
| Name | Description | |
|---|---|---|
![]() ![]() | Clone | Clones another instance of this instance of the class. |
![]() | CloneCore | Clones another instance of this instance of the class. |
![]() | CreateKeyIdentifierClause | Creates a key identifier clause for a token. |
![]() ![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InitializeSecurityTokenRequirement | When overridden in a derived class, initializes a security token requirement. |
![]() | MatchesKeyIdentifierClause | Indicates whether a token matches a key identifier clause. |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Displays a text representation of this instance of the class. (Overrides Object.ToString().) |
Security token parameters provide information about the tokens (for example, token type, issuer, and so on) required by the security binding element.
The security token parameter classes derived from this one are a collection of token properties and methods, and are used in creating different kinds of security binding elements and tokens. Not all of the properties are relevant to all derived classes. For example, the ReferenceStyle has no relevance in an issued token (SAML token) case.
The following code shows a custom override of this class called CreditCardTokenParameters.
public class CreditCardTokenParameters : SecurityTokenParameters { public CreditCardTokenParameters() { } protected CreditCardTokenParameters(CreditCardTokenParameters other) : base(other) { } protected override SecurityTokenParameters CloneCore() { return new CreditCardTokenParameters(this); } protected override void InitializeSecurityTokenRequirement(SecurityTokenRequirement requirement) { requirement.TokenType = Constants.CreditCardTokenType; return; } // A credit card token has no cryptography, no windows identity, and supports only client authentication. protected override bool HasAsymmetricKey { get { return false; } } protected override bool SupportsClientAuthentication { get { return true; } } protected override bool SupportsClientWindowsIdentity { get { return false; } } protected override bool SupportsServerAuthentication { get { return false; } } protected override SecurityKeyIdentifierClause CreateKeyIdentifierClause(SecurityToken token, SecurityTokenReferenceStyle referenceStyle) { if (referenceStyle == SecurityTokenReferenceStyle.Internal) { return token.CreateKeyIdentifierClause<LocalIdKeyIdentifierClause>(); } else { throw new NotSupportedException("External references are not supported for credit card tokens"); } } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


