SupportingTokenSpecification.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Security
  5. {
  6. using System.Collections.ObjectModel;
  7. using System.ServiceModel;
  8. using System.IdentityModel.Policy;
  9. using System.IdentityModel.Tokens;
  10. using System.ServiceModel.Security.Tokens;
  11. public class SupportingTokenSpecification : SecurityTokenSpecification
  12. {
  13. SecurityTokenAttachmentMode tokenAttachmentMode;
  14. SecurityTokenParameters tokenParameters;
  15. public SupportingTokenSpecification(SecurityToken token, ReadOnlyCollection<IAuthorizationPolicy> tokenPolicies, SecurityTokenAttachmentMode attachmentMode)
  16. : this(token, tokenPolicies, attachmentMode, null)
  17. { }
  18. public SupportingTokenSpecification(SecurityToken token, ReadOnlyCollection<IAuthorizationPolicy> tokenPolicies, SecurityTokenAttachmentMode attachmentMode, SecurityTokenParameters tokenParameters)
  19. : base(token, tokenPolicies)
  20. {
  21. SecurityTokenAttachmentModeHelper.Validate(attachmentMode);
  22. this.tokenAttachmentMode = attachmentMode;
  23. this.tokenParameters = tokenParameters;
  24. }
  25. public SecurityTokenAttachmentMode SecurityTokenAttachmentMode
  26. {
  27. get { return this.tokenAttachmentMode; }
  28. }
  29. internal SecurityTokenParameters SecurityTokenParameters
  30. {
  31. get { return this.tokenParameters; }
  32. }
  33. }
  34. }