TokenInterface.php 641 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Aws\Token;
  3. /**
  4. * Provides access to an AWS token used for accessing AWS services
  5. */
  6. interface TokenInterface
  7. {
  8. /**
  9. * Returns the token this token object.
  10. *
  11. * @return string
  12. */
  13. public function getToken();
  14. /**
  15. * Get the UNIX timestamp in which the token will expire
  16. *
  17. * @return int|null
  18. */
  19. public function getExpiration();
  20. /**
  21. * Check if the token are expired
  22. *
  23. * @return bool
  24. */
  25. public function isExpired();
  26. /**
  27. * Converts the token to an associative array.
  28. *
  29. * @return array
  30. */
  31. public function toArray();
  32. }