SupportingTokenProviderSpecification.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Security
  5. {
  6. using System.IdentityModel.Selectors;
  7. using System.ServiceModel;
  8. using System.ServiceModel.Security.Tokens;
  9. class SupportingTokenProviderSpecification
  10. {
  11. SecurityTokenAttachmentMode tokenAttachmentMode;
  12. SecurityTokenProvider tokenProvider;
  13. SecurityTokenParameters tokenParameters;
  14. public SupportingTokenProviderSpecification(SecurityTokenProvider tokenProvider, SecurityTokenAttachmentMode attachmentMode, SecurityTokenParameters tokenParameters)
  15. {
  16. if (tokenProvider == null)
  17. {
  18. throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenProvider");
  19. }
  20. SecurityTokenAttachmentModeHelper.Validate(attachmentMode);
  21. if (tokenParameters == null)
  22. {
  23. throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("tokenParameters");
  24. }
  25. this.tokenProvider = tokenProvider;
  26. this.tokenAttachmentMode = attachmentMode;
  27. this.tokenParameters = tokenParameters;
  28. }
  29. public SecurityTokenProvider TokenProvider
  30. {
  31. get { return this.tokenProvider; }
  32. }
  33. public SecurityTokenAttachmentMode SecurityTokenAttachmentMode
  34. {
  35. get { return this.tokenAttachmentMode; }
  36. }
  37. public SecurityTokenParameters TokenParameters
  38. {
  39. get { return this.tokenParameters; }
  40. }
  41. }
  42. }