Credentials.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace OAuth\Common\Consumer;
  3. /**
  4. * Value object for the credentials of an OAuth service.
  5. */
  6. class Credentials implements CredentialsInterface
  7. {
  8. /**
  9. * @var string
  10. */
  11. protected $consumerId;
  12. /**
  13. * @var string
  14. */
  15. protected $consumerSecret;
  16. /**
  17. * @var string
  18. */
  19. protected $callbackUrl;
  20. /**
  21. * @param string $consumerId
  22. * @param string $consumerSecret
  23. * @param string $callbackUrl
  24. */
  25. public function __construct($consumerId, $consumerSecret, $callbackUrl)
  26. {
  27. $this->consumerId = $consumerId;
  28. $this->consumerSecret = $consumerSecret;
  29. $this->callbackUrl = $callbackUrl;
  30. }
  31. /**
  32. * @return string
  33. */
  34. public function getCallbackUrl()
  35. {
  36. return $this->callbackUrl;
  37. }
  38. /**
  39. * @return string
  40. */
  41. public function getConsumerId()
  42. {
  43. return $this->consumerId;
  44. }
  45. /**
  46. * @return string
  47. */
  48. public function getConsumerSecret()
  49. {
  50. return $this->consumerSecret;
  51. }
  52. }