DispatchContext.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Security
  5. {
  6. using System.IdentityModel.Protocols.WSTrust;
  7. using System.Security.Claims;
  8. using RSTR = System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse;
  9. using System.IdentityModel;
  10. /// <summary>
  11. /// Defines the inputs and outputs to the <see cref="WSTrustServiceContract.DispatchRequest"/> method.
  12. /// </summary>
  13. public class DispatchContext
  14. {
  15. ClaimsPrincipal principal;
  16. string requestAction;
  17. WSTrustMessage requestMessage;
  18. string responseAction;
  19. RSTR responseMessage;
  20. SecurityTokenService securityTokenService;
  21. string trustNamespace;
  22. /// <summary>
  23. /// The identity of the requestor.
  24. /// </summary>
  25. public ClaimsPrincipal Principal
  26. {
  27. get { return principal; }
  28. set { principal = value; }
  29. }
  30. /// <summary>
  31. /// The WS-Addressing action of the request message.
  32. /// </summary>
  33. public string RequestAction
  34. {
  35. get { return requestAction; }
  36. set { requestAction = value; }
  37. }
  38. /// <summary>
  39. /// The request message.
  40. /// </summary>
  41. public WSTrustMessage RequestMessage
  42. {
  43. get { return requestMessage; }
  44. set { requestMessage = value; }
  45. }
  46. /// <summary>
  47. /// The desired WS-Addressing action of the response message.
  48. /// </summary>
  49. public string ResponseAction
  50. {
  51. get { return responseAction; }
  52. set { responseAction = value; }
  53. }
  54. /// <summary>
  55. /// The response message.
  56. /// </summary>
  57. public RSTR ResponseMessage
  58. {
  59. get { return responseMessage; }
  60. set { responseMessage = value; }
  61. }
  62. /// <summary>
  63. /// The <see cref="SecurityTokenService"/> object which should process <see cref="RequestMessage"/>.
  64. /// </summary>
  65. public SecurityTokenService SecurityTokenService
  66. {
  67. get { return securityTokenService; }
  68. set { securityTokenService = value; }
  69. }
  70. /// <summary>
  71. /// The WS-Trust namespace uri defining the schema for the request and response messages.
  72. /// </summary>
  73. public string TrustNamespace
  74. {
  75. get { return trustNamespace; }
  76. set { trustNamespace = value; }
  77. }
  78. }
  79. }