TokenAuthorization.php 645 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Aws\Token;
  3. use Psr\Http\Message\RequestInterface;
  4. /**
  5. * Interface used to provide interchangeable strategies for adding authorization
  6. * to requests using the various AWS signature protocols.
  7. */
  8. interface TokenAuthorization
  9. {
  10. /**
  11. * Adds the specified token to a request by adding the required headers.
  12. *
  13. * @param RequestInterface $request Request to sign
  14. * @param TokenInterface $token Token
  15. *
  16. * @return RequestInterface Returns the modified request.
  17. */
  18. public function authorizeRequest(
  19. RequestInterface $request,
  20. TokenInterface $token
  21. );
  22. }