IWSTrustChannelContract.cs 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. //------------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------------------------
  4. namespace System.ServiceModel.Security
  5. {
  6. using System;
  7. using System.IdentityModel.Tokens;
  8. using System.Runtime.InteropServices;
  9. using System.ServiceModel;
  10. using System.IdentityModel.Protocols.WSTrust;
  11. /// <summary>
  12. /// A service contract that defines the methods which wrap the Message-oriented
  13. /// operation contracts exposed by <see cref="IWSTrustContract" />.
  14. /// </summary>
  15. [ServiceContract]
  16. [ComVisible(false)]
  17. public interface IWSTrustChannelContract : IWSTrustContract
  18. {
  19. /// <summary>
  20. /// Sends a WS-Trust Cancel message to an endpoint.
  21. /// </summary>
  22. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  23. /// <returns>The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</returns>
  24. System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse Cancel(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
  25. /// <summary>
  26. /// Asynchronously sends a WS-Trust Cancel message to an endpoint.
  27. /// </summary>
  28. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  29. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  30. /// <param name="state">A user-provided object that distinguishes this particular asynchronous send
  31. /// request from other requests.</param>
  32. /// <returns>An <see cref="IAsyncResult" /> object that represents the asynchronous send, which could still
  33. /// be pending. </returns>
  34. IAsyncResult BeginCancel(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object state);
  35. /// <summary>
  36. /// Completes the asynchronous send operation initiated by <see cref="BeginCancel" />.
  37. /// </summary>
  38. /// <param name="result">A reference to the outstanding asynchronous send request.</param>
  39. /// <param name="response">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</param>
  40. void EndCancel(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
  41. /// <summary>
  42. /// Sends a WS-Trust Issue message to an endpoint STS
  43. /// </summary>
  44. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  45. /// <returns>A <see cref="SecurityToken" /> that represents the token issued by the STS.</returns>
  46. SecurityToken Issue(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
  47. /// <summary>
  48. /// Sends a WS-Trust Issue message to an endpoint STS
  49. /// </summary>
  50. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  51. /// <param name="response">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> that represents the response from
  52. /// the STS.</param>
  53. /// <returns>A <see cref="SecurityToken" /> that represents the token issued by the STS.</returns>
  54. SecurityToken Issue(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
  55. /// <summary>
  56. /// Asynchronously sends a WS-Trust Renew message to an endpoint.
  57. /// </summary>
  58. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  59. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  60. /// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous send
  61. /// request from other requests.</param>
  62. /// <returns>An <see cref="IAsyncResult" /> object that represents the asynchronous send, which could still
  63. /// be pending. </returns>
  64. IAsyncResult BeginIssue(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object asyncState);
  65. /// <summary>
  66. /// Completes the asynchronous send operation initiated by <see cref="BeginIssue" />.
  67. /// </summary>
  68. /// <param name="result">A reference to the outstanding asynchronous send request.</param>
  69. /// <param name="response">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</param>
  70. /// <returns>A <see cref="SecurityToken" /> that represents the token issued by the STS.</returns>
  71. SecurityToken EndIssue(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
  72. /// <summary>
  73. /// Sends a WS-Trust Renew message to an endpoint.
  74. /// </summary>
  75. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  76. /// <returns>The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</returns>
  77. System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse Renew(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
  78. /// <summary>
  79. /// Asynchronously sends a WS-Trust Renew message to an endpoint.
  80. /// </summary>
  81. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  82. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  83. /// <param name="state">A user-provided object that distinguishes this particular asynchronous send
  84. /// request from other requests.</param>
  85. /// <returns>An <see cref="IAsyncResult" /> object that represents the asynchronous send, which could still
  86. /// be pending. </returns>
  87. IAsyncResult BeginRenew(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object state);
  88. /// <summary>
  89. /// Completes the asynchronous send operation initiated by <see cref="BeginRenew" />.
  90. /// </summary>
  91. /// <param name="result">A reference to the outstanding asynchronous send request.</param>
  92. /// <param name="response">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</param>
  93. void EndRenew(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
  94. /// <summary>
  95. /// Sends a WS-Trust Validate message to an endpoint.
  96. /// </summary>
  97. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  98. /// <returns>The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</returns>
  99. System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse Validate(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request);
  100. /// <summary>
  101. /// Asynchronously sends a WS-Trust Validate message to an endpoint.
  102. /// </summary>
  103. /// <param name="request">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityToken" /> that represents the request to the STS.</param>
  104. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  105. /// <param name="state">A user-provided object that distinguishes this particular asynchronous send
  106. /// request from other requests.</param>
  107. /// <returns>An <see cref="IAsyncResult" /> object that represents the asynchronous send, which could still
  108. /// be pending. </returns>
  109. IAsyncResult BeginValidate(System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, AsyncCallback callback, object state);
  110. /// <summary>
  111. /// Completes the asynchronous send operation initiated by <see cref="BeginValidate" />.
  112. /// </summary>
  113. /// <param name="result">A reference to the outstanding asynchronous send request.</param>
  114. /// <param name="response">The <see cref="System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse" /> representing the STS response.</param>
  115. void EndValidate(IAsyncResult result, out System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse response);
  116. }
  117. }