AccessTokenInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace OAuth2\ResponseType;
  3. /**
  4. *
  5. * @author Brent Shaffer <bshafs at gmail dot com>
  6. */
  7. interface AccessTokenInterface extends ResponseTypeInterface
  8. {
  9. /**
  10. * Handle the creation of access token, also issue refresh token if supported / desirable.
  11. *
  12. * @param $client_id client identifier related to the access token.
  13. * @param $user_id user ID associated with the access token
  14. * @param $scope OPTONAL scopes to be stored in space-separated string.
  15. * @param bool $includeRefreshToken if true, a new refresh_token will be added to the response
  16. *
  17. * @see http://tools.ietf.org/html/rfc6749#section-5
  18. * @ingroup oauth2_section_5
  19. */
  20. public function createAccessToken($client_id, $user_id, $scope = null, $includeRefreshToken = true);
  21. /**
  22. * Handle the revoking of refresh tokens, and access tokens if supported / desirable
  23. *
  24. * @param $token
  25. * @param $tokenTypeHint
  26. * @return mixed
  27. *
  28. * @todo v2.0 include this method in interface. Omitted to maintain BC in v1.x
  29. */
  30. //public function revokeToken($token, $tokenTypeHint);
  31. }