ServiceContext.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace FastReport.Cloud.OAuth
  5. {
  6. /// <summary>
  7. /// Represents the service provider.
  8. /// </summary>
  9. public class ServiceContext
  10. {
  11. #region Fields
  12. private string requestTokenUrl;
  13. private string userAuthorizationUrl;
  14. private string callbackUrl;
  15. private string accessTokenUrl;
  16. #endregion // Fields
  17. #region Properties
  18. /// <summary>
  19. /// Gets the request token URL.
  20. /// </summary>
  21. public string RequestTokenUrl
  22. {
  23. get { return requestTokenUrl; }
  24. }
  25. /// <summary>
  26. /// Gets the user authorization URL.
  27. /// </summary>
  28. public string UserAuthorizationUrl
  29. {
  30. get { return userAuthorizationUrl; }
  31. }
  32. /// <summary>
  33. /// Gets the callback URL.
  34. /// </summary>
  35. public string CallbackUrl
  36. {
  37. get { return callbackUrl; }
  38. }
  39. /// <summary>
  40. /// Gets the access token URL.
  41. /// </summary>
  42. public string AccessTokenUrl
  43. {
  44. get { return accessTokenUrl; }
  45. }
  46. #endregion // Properties
  47. #region Constructors
  48. /// <summary>
  49. /// Initializes a new instance of the <see cref="ServiceContext"/> class with a specified parameters.
  50. /// </summary>
  51. /// <param name="requestTokenUrl">The request token URL.</param>
  52. /// <param name="userAuthorizationUrl">The user authorization URL.</param>
  53. /// <param name="callbackUrl">The callback URL.</param>
  54. /// <param name="accessTokenUrl">The access token URL.</param>
  55. public ServiceContext(string requestTokenUrl, string userAuthorizationUrl, string callbackUrl, string accessTokenUrl)
  56. {
  57. this.requestTokenUrl = requestTokenUrl;
  58. this.userAuthorizationUrl = userAuthorizationUrl;
  59. this.callbackUrl = callbackUrl;
  60. this.accessTokenUrl = accessTokenUrl;
  61. }
  62. #endregion // Constructors
  63. }
  64. }