Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SecurityTokenParameters Class

An abstract class that when implemented represents security token parameters.

Namespace: System.ServiceModel.Security.Tokens
Assembly: System.ServiceModel (in system.servicemodel.dll)

public abstract class SecurityTokenParameters
public abstract class SecurityTokenParameters
public abstract class SecurityTokenParameters
Not applicable.

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");
        }
    }
}

System.Object
  System.ServiceModel.Security.Tokens.SecurityTokenParameters
     Derived Classes

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

Show:
© 2015 Microsoft