IWSTrust13AsyncContract.cs 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Security
  5. {
  6. using System;
  7. using System.IdentityModel.Protocols.WSTrust;
  8. using System.ServiceModel;
  9. using System.ServiceModel.Channels;
  10. /// <summary>
  11. /// Defines the ServiceContract Asynchronous interface for a Trust 1.3 protocol.
  12. /// </summary>
  13. [ServiceContract( Name = WSTrustServiceContractConstants.Contracts.IWSTrust13Async, Namespace = WSTrustServiceContractConstants.Namespace )]
  14. public interface IWSTrust13AsyncContract
  15. {
  16. /// <summary>
  17. /// Definiton of Async RST/Cancel method for WS-Trust 1.3
  18. /// </summary>
  19. /// <param name="request">Request Message containing the RST.</param>
  20. /// <param name="callback">AsyncCallback context.</param>
  21. /// <param name="state">Asyn state.</param>
  22. /// <returns>IAsyncResult result instance.</returns>
  23. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13CancelAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.Cancel, ReplyAction = WSTrust13Constants.Actions.CancelFinalResponse )]
  24. IAsyncResult BeginTrust13Cancel( Message request, AsyncCallback callback, object state );
  25. /// <summary>
  26. /// Completes the Async RST/Cancel method.
  27. /// </summary>
  28. /// <param name="ar">The IAsyncResult result instance returned by the BeginCancel call.</param>
  29. /// <returns>Message object that contains the RSTR.</returns>
  30. Message EndTrust13Cancel( IAsyncResult ar );
  31. /// <summary>
  32. /// Definiton of Async RST/Issue method for WS-Trust 1.3
  33. /// </summary>
  34. /// <param name="request">Request Message containing the RST.</param>
  35. /// <param name="callback">AsyncCallback context.</param>
  36. /// <param name="state">Asyn state.</param>
  37. /// <returns>IAsyncResult result instance.</returns>
  38. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13IssueAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.Issue, ReplyAction = WSTrust13Constants.Actions.IssueFinalResponse )]
  39. IAsyncResult BeginTrust13Issue( Message request, AsyncCallback callback, object state );
  40. /// <summary>
  41. /// Completes the Async RST/Issue method.
  42. /// </summary>
  43. /// <param name="ar">The IAsyncResult result instance returned by the BeginIssue call.</param>
  44. /// <returns>Message object that contains the RSTR.</returns>
  45. Message EndTrust13Issue( IAsyncResult ar );
  46. /// <summary>
  47. /// Definiton of Async RST/Renew method for WS-Trust 1.3
  48. /// </summary>
  49. /// <param name="request">Request Message containing the RST.</param>
  50. /// <param name="callback">AsyncCallback context.</param>
  51. /// <param name="state">Asyn state.</param>
  52. /// <returns>IAsyncResult result instance.</returns>
  53. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13RenewAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.Renew, ReplyAction = WSTrust13Constants.Actions.RenewFinalResponse )]
  54. IAsyncResult BeginTrust13Renew( Message request, AsyncCallback callback, object state );
  55. /// <summary>
  56. /// Completes the Async RST/Renew method.
  57. /// </summary>
  58. /// <param name="ar">The IAsyncResult result instance returned by the BeginRenew call.</param>
  59. /// <returns>Message object that contains the RSTR.</returns>
  60. Message EndTrust13Renew( IAsyncResult ar );
  61. /// <summary>
  62. /// Definiton of Async RST/Validate method for WS-Trust 1.3
  63. /// </summary>
  64. /// <param name="request">Request Message containing the RST.</param>
  65. /// <param name="callback">AsyncCallback context.</param>
  66. /// <param name="state">Asyn state.</param>
  67. /// <returns>IAsyncResult result instance.</returns>
  68. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13ValidateAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.Validate, ReplyAction = WSTrust13Constants.Actions.ValidateFinalResponse )]
  69. IAsyncResult BeginTrust13Validate( Message request, AsyncCallback callback, object state );
  70. /// <summary>
  71. /// Completes the Async RST/Validate method.
  72. /// </summary>
  73. /// <param name="ar">The IAsyncResult result instance returned by the BeginValidate call.</param>
  74. /// <returns>Message object that contains the RSTR.</returns>
  75. Message EndTrust13Validate( IAsyncResult ar );
  76. /// <summary>
  77. /// Definiton of Async RSTR/Cancel method for WS-Trust 1.3
  78. /// </summary>
  79. /// <param name="request">Request Message containing the RST.</param>
  80. /// <param name="callback">AsyncCallback context.</param>
  81. /// <param name="state">Asyn state.</param>
  82. /// <returns>IAsyncResult result instance.</returns>
  83. //
  84. // NOTE:
  85. // ReplyAction = "*" has a side effect of not generating this operation, port, or messages in the
  86. // WCF-generated WSDL. This is desired.
  87. //
  88. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13CancelResponseAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.CancelResponse, ReplyAction = "*" )]
  89. IAsyncResult BeginTrust13CancelResponse( Message request, AsyncCallback callback, object state );
  90. /// <summary>
  91. /// Completes the Async RSTR/Cancel method.
  92. /// </summary>
  93. /// <param name="ar">The IAsyncResult result instance returned by the BeginCancel call.</param>
  94. /// <returns>Message object that contains the RSTR.</returns>
  95. Message EndTrust13CancelResponse( IAsyncResult ar );
  96. /// <summary>
  97. /// Definiton of Async RSTR/Issue method for WS-Trust 1.3
  98. /// </summary>
  99. /// <param name="request">Request Message containing the RST.</param>
  100. /// <param name="callback">AsyncCallback context.</param>
  101. /// <param name="state">Asyn state.</param>
  102. /// <returns>IAsyncResult result instance.</returns>
  103. //
  104. // NOTE:
  105. // ReplyAction = "*" has a side effect of not generating this operation, port, or messages in the
  106. // WCF-generated WSDL. This is desired.
  107. //
  108. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13IssueResponseAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.IssueResponse, ReplyAction = "*" )]
  109. IAsyncResult BeginTrust13IssueResponse( Message request, AsyncCallback callback, object state );
  110. /// <summary>
  111. /// Completes the Async RSTR/Issue method.
  112. /// </summary>
  113. /// <param name="ar">The IAsyncResult result instance returned by the BeginIssue call.</param>
  114. /// <returns>Message object that contains the RSTR.</returns>
  115. Message EndTrust13IssueResponse( IAsyncResult ar );
  116. /// <summary>
  117. /// Definiton of Async RSTR/Renew method for WS-Trust 1.3
  118. /// </summary>
  119. /// <param name="request">Request Message containing the RST.</param>
  120. /// <param name="callback">AsyncCallback context.</param>
  121. /// <param name="state">Asyn state.</param>
  122. /// <returns>IAsyncResult result instance.</returns>
  123. //
  124. // NOTE:
  125. // ReplyAction = "*" has a side effect of not generating this operation, port, or messages in the
  126. // WCF-generated WSDL. This is desired.
  127. //
  128. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13RenewResponseAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.RenewResponse, ReplyAction = "*" )]
  129. IAsyncResult BeginTrust13RenewResponse( Message request, AsyncCallback callback, object state );
  130. /// <summary>
  131. /// Completes the Async RSTR/Renew method.
  132. /// </summary>
  133. /// <param name="ar">The IAsyncResult result instance returned by the BeginRenew call.</param>
  134. /// <returns>Message object that contains the RSTR.</returns>
  135. Message EndTrust13RenewResponse( IAsyncResult ar );
  136. /// <summary>
  137. /// Definiton of Async RSTR/Validate method for WS-Trust 1.3
  138. /// </summary>
  139. /// <param name="request">Request Message containing the RST.</param>
  140. /// <param name="callback">AsyncCallback context.</param>
  141. /// <param name="state">Asyn state.</param>
  142. /// <returns>IAsyncResult result instance.</returns>
  143. //
  144. // NOTE:
  145. // ReplyAction = "*" has a side effect of not generating this operation, port, or messages in the
  146. // WCF-generated WSDL. This is desired.
  147. //
  148. [OperationContract( Name = WSTrustServiceContractConstants.Operations.Trust13ValidateResponseAsync, AsyncPattern = true, Action = WSTrust13Constants.Actions.ValidateResponse, ReplyAction = "*" )]
  149. IAsyncResult BeginTrust13ValidateResponse( Message request, AsyncCallback callback, object state );
  150. /// <summary>
  151. /// Completes the Async RSTR/Validate method.
  152. /// </summary>
  153. /// <param name="ar">The IAsyncResult result instance returned by the BeginValidate call.</param>
  154. /// <returns>Message object that contains the RSTR.</returns>
  155. Message EndTrust13ValidateResponse( IAsyncResult ar );
  156. }
  157. }