SecureConversationDriver.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.IdentityModel.Claims;
  9. using System.IdentityModel.Policy;
  10. using System.Runtime.Serialization;
  11. using System.Collections.Generic;
  12. using System.Diagnostics;
  13. using System.Xml;
  14. using System.Security.Principal;
  15. abstract class SecureConversationDriver
  16. {
  17. public virtual XmlDictionaryString CloseAction
  18. {
  19. get
  20. {
  21. // PreSharp Bug: Property get methods should not throw exceptions.
  22. #pragma warning suppress 56503
  23. throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SecureConversationDriverVersionDoesNotSupportSession)));
  24. }
  25. }
  26. public virtual XmlDictionaryString CloseResponseAction
  27. {
  28. get
  29. {
  30. // PreSharp Bug: Property get methods should not throw exceptions.
  31. #pragma warning suppress 56503
  32. throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SecureConversationDriverVersionDoesNotSupportSession)));
  33. }
  34. }
  35. public virtual bool IsSessionSupported
  36. {
  37. get
  38. {
  39. return false;
  40. }
  41. }
  42. public abstract XmlDictionaryString IssueAction { get; }
  43. public abstract XmlDictionaryString IssueResponseAction { get; }
  44. public virtual XmlDictionaryString RenewAction
  45. {
  46. get
  47. {
  48. // PreSharp Bug: Property get methods should not throw exceptions.
  49. #pragma warning suppress 56503
  50. throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SecureConversationDriverVersionDoesNotSupportSession)));
  51. }
  52. }
  53. public virtual XmlDictionaryString RenewResponseAction
  54. {
  55. get
  56. {
  57. // PreSharp Bug: Property get methods should not throw exceptions.
  58. #pragma warning suppress 56503
  59. throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SecureConversationDriverVersionDoesNotSupportSession)));
  60. }
  61. }
  62. public abstract XmlDictionaryString Namespace { get; }
  63. public abstract XmlDictionaryString RenewNeededFaultCode { get; }
  64. public abstract XmlDictionaryString BadContextTokenFaultCode { get; }
  65. public abstract string TokenTypeUri { get; }
  66. public abstract UniqueId GetSecurityContextTokenId(XmlDictionaryReader reader);
  67. public abstract bool IsAtSecurityContextToken(XmlDictionaryReader reader);
  68. }
  69. }