IWSTrustContract.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Security
  5. {
  6. using System;
  7. using System.ServiceModel;
  8. using System.ServiceModel.Channels;
  9. /// <summary>
  10. /// Defines the IWSTrustContract for sending WS-Trust messages to an STS.
  11. /// </summary>
  12. [ServiceContract]
  13. public interface IWSTrustContract
  14. {
  15. /// <summary>
  16. /// Method for Cancel binding for WS-Trust
  17. /// </summary>
  18. /// <param name="message">The Request Message that contains a RST.</param>
  19. /// <returns>Response message containing the RSTR.</returns>
  20. [OperationContract(Name = "Cancel", Action = "*", ReplyAction = "*")]
  21. Message Cancel(Message message);
  22. /// <summary>
  23. /// Begin Async Method for Cancel binding for WS-Trust
  24. /// </summary>
  25. /// <param name="message">The Request Message that contains a RST.</param>
  26. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  27. /// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous send request from other requests.</param>
  28. /// <returns>An IAsyncResult object that represents the asynchronous send, which could still be pending. </returns>
  29. [OperationContract(AsyncPattern = true, Name = "Cancel", Action = "*", ReplyAction = "*")]
  30. IAsyncResult BeginCancel(Message message, AsyncCallback callback, object asyncState);
  31. /// <summary>
  32. /// End Async Method for Cancel binding for WS-Trust
  33. /// </summary>
  34. /// <param name="asyncResult">A reference to the outstanding asynchronous send request.</param>
  35. /// <returns>Response message containing the RSTR.</returns>
  36. Message EndCancel(IAsyncResult asyncResult);
  37. /// <summary>
  38. /// Method for Issue binding for WS-Trust
  39. /// </summary>
  40. /// <param name="message">The Request Message that contains a RST.</param>
  41. /// <returns>Response message containing the RSTR.</returns>
  42. [OperationContract(Name = "Issue", Action = "*", ReplyAction = "*")]
  43. Message Issue(Message message);
  44. /// <summary>
  45. /// Begin Async Method for Issue binding for WS-Trust
  46. /// </summary>
  47. /// <param name="message">The Request Message that contains a RST.</param>
  48. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  49. /// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous send request from other requests.</param>
  50. /// <returns>An IAsyncResult object that represents the asynchronous send, which could still be pending. </returns>
  51. [OperationContract(AsyncPattern = true, Name = "Issue", Action = "*", ReplyAction = "*")]
  52. IAsyncResult BeginIssue(Message message, AsyncCallback callback, object asyncState);
  53. /// <summary>
  54. /// End Async Method for Issue binding for WS-Trust
  55. /// </summary>
  56. /// <param name="asyncResult">A reference to the outstanding asynchronous send request.</param>
  57. /// <returns>Response message containing the RSTR.</returns>
  58. Message EndIssue(IAsyncResult asyncResult);
  59. /// <summary>
  60. /// Method for Renew binding for WS-Trust
  61. /// </summary>
  62. /// <param name="message">The Request Message that contains a RST.</param>
  63. /// <returns>Response message containing the RSTR.</returns>
  64. [OperationContract(Name = "Renew", Action = "*", ReplyAction = "*")]
  65. Message Renew(Message message);
  66. /// <summary>
  67. /// Begin Async Method for Renew binding for WS-Trust
  68. /// </summary>
  69. /// <param name="message">The Request Message that contains a RST.</param>
  70. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  71. /// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous send request from other requests.</param>
  72. /// <returns>An IAsyncResult object that represents the asynchronous send, which could still be pending. </returns>
  73. [OperationContract(AsyncPattern = true, Name = "Renew", Action = "*", ReplyAction = "*")]
  74. IAsyncResult BeginRenew(Message message, AsyncCallback callback, object asyncState);
  75. /// <summary>
  76. /// End Async Method for Renew binding for WS-Trust
  77. /// </summary>
  78. /// <param name="asyncResult">A reference to the outstanding asynchronous send request.</param>
  79. /// <returns>Response message containing the RSTR.</returns>
  80. Message EndRenew(IAsyncResult asyncResult);
  81. /// <summary>
  82. /// Method for Validate binding for WS-Trust
  83. /// </summary>
  84. /// <param name="message">The Request Message that contains a RST.</param>
  85. /// <returns>Response message containing the RSTR.</returns>
  86. [OperationContract(Name = "Validate", Action = "*", ReplyAction = "*")]
  87. Message Validate(Message message);
  88. /// <summary>
  89. /// Begin Async Method for Validate binding for WS-Trust
  90. /// </summary>
  91. /// <param name="message">The Request Message that contains a RST.</param>
  92. /// <param name="callback">An optional asynchronous callback, to be called when the send is complete.</param>
  93. /// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous send request from other requests.</param>
  94. /// <returns>An IAsyncResult object that represents the asynchronous send, which could still be pending. </returns>
  95. [OperationContract(AsyncPattern = true, Name = "Validate", Action = "*", ReplyAction = "*")]
  96. IAsyncResult BeginValidate(Message message, AsyncCallback callback, object asyncState);
  97. /// <summary>
  98. /// End Async Method for Validate binding for WS-Trust
  99. /// </summary>
  100. /// <param name="asyncResult">A reference to the outstanding asynchronous send request.</param>
  101. /// <returns>Response message containing the RSTR.</returns>
  102. Message EndValidate(IAsyncResult asyncResult);
  103. }
  104. }