PPTokenAuthorization.php 806 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. *
  4. * Represents token based third party authorization
  5. * Token based authorization credentials are obtained using
  6. * the Permissions API
  7. */
  8. class PPTokenAuthorization implements IPPThirdPartyAuthorization {
  9. /**
  10. * Permanent access token that identifies the relationship
  11. * between the authorizing user and the API caller.
  12. * @var string
  13. */
  14. private $accessToken;
  15. /**
  16. * The token secret/password that will need to be used when
  17. * generating the signature.
  18. * @var string
  19. */
  20. private $tokenSecret;
  21. public function __construct($accessToken, $tokenSecret) {
  22. $this->accessToken = $accessToken;
  23. $this->tokenSecret = $tokenSecret;
  24. }
  25. public function getAccessToken() {
  26. return $this->accessToken;
  27. }
  28. public function getTokenSecret() {
  29. return $this->tokenSecret;
  30. }
  31. }