//----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- namespace System.IdentityModel.Protocols.WSTrust { using System.IdentityModel.Tokens; /// /// This optional element enables the client to request the Identity provider to issue a token /// containing his public key which is specified under the 'UseKey' element. However, the client /// has to prove possesion of the key. In a WS-Security based SOAP message the client can add /// his certificate as an endorsing token to the Security header to prove possession of the key. /// public class UseKey { SecurityToken _token; SecurityKeyIdentifier _ski; /// /// Constructor for extensibility point /// public UseKey() : base() { } /// /// Creates an instance of . /// /// A security key identifier which represents the existing key that should be used. public UseKey(SecurityKeyIdentifier ski) : this(ski, null) { } /// /// Creates an instance of . /// /// A token which represents existing key that should be used. public UseKey(SecurityToken token) : this(null, token) { } /// /// Creates an instance of . /// /// A security key identifier which represents the existing key that should be used. /// A token which represents existing key that should be used. public UseKey(SecurityKeyIdentifier ski, SecurityToken token) { _ski = ski; _token = token; } /// /// Gets the security token. /// public SecurityToken Token { get { return _token; } } /// /// Gets the security key identifier. /// public SecurityKeyIdentifier SecurityKeyIdentifier { get { return _ski; } } } }