ConsumerContext.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace FastReport.Cloud.OAuth
  5. {
  6. /// <summary>
  7. /// Represents the consumer.
  8. /// </summary>
  9. public class ConsumerContext
  10. {
  11. #region Fields
  12. private string consumerKey;
  13. private string consumerSecret;
  14. private string signatureMethod;
  15. #endregion // Fields
  16. #region Properties
  17. /// <summary>
  18. /// Gets the consumer key.
  19. /// </summary>
  20. public string ConsumerKey
  21. {
  22. get { return consumerKey; }
  23. }
  24. /// <summary>
  25. /// Gest the consumer secret.
  26. /// </summary>
  27. public string ConsumerSecret
  28. {
  29. get { return consumerSecret; }
  30. }
  31. /// <summary>
  32. /// Gets the consumer's signature method.
  33. /// </summary>
  34. public string SignatureMethod
  35. {
  36. get { return signatureMethod; }
  37. }
  38. #endregion // Properties
  39. #region Constructors
  40. /// <summary>
  41. /// Initializes a new instance of the <see cref="ConsumerContext"/> class.
  42. /// </summary>
  43. /// <param name="consumerKey">The consumer key.</param>
  44. /// <param name="consumerSecret">The consumer secret.</param>
  45. public ConsumerContext(string consumerKey, string consumerSecret)
  46. {
  47. this.consumerKey = consumerKey;
  48. this.consumerSecret = consumerSecret;
  49. signatureMethod = OAuth.SignatureMethod.HmacSha1;
  50. }
  51. #endregion // Constructors
  52. }
  53. }