ClientEntity.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace oauth2\entity;
  3. use League\OAuth2\Server\Entities\ClientEntityInterface;
  4. use League\OAuth2\Server\Entities\Traits\ClientTrait;
  5. use League\OAuth2\Server\Entities\Traits\EntityTrait;
  6. /**
  7. * Class ClientEntity
  8. * @package oauth2\entity
  9. * @author jianyan74 <751393839@qq.com>
  10. */
  11. class ClientEntity implements ClientEntityInterface
  12. {
  13. use EntityTrait, ClientTrait;
  14. /**
  15. * @var string
  16. */
  17. protected $grantType;
  18. /**
  19. * Get the client's name.
  20. *
  21. * @return string
  22. * @codeCoverageIgnore
  23. */
  24. public function getGrantType()
  25. {
  26. return $this->grantType;
  27. }
  28. /**
  29. * @param $grantType
  30. */
  31. public function setGrantType($grantType)
  32. {
  33. $this->grantType = $grantType;
  34. }
  35. /**
  36. * @param $name
  37. */
  38. public function setName($name)
  39. {
  40. $this->name = $name;
  41. }
  42. /**
  43. * @param $redirectUri
  44. */
  45. public function setRedirectUri($redirectUri)
  46. {
  47. $this->redirectUri = $redirectUri;
  48. }
  49. /**
  50. * Returns true if the client is confidential.
  51. *
  52. * @return bool
  53. */
  54. public function isConfidential()
  55. {
  56. return true;
  57. }
  58. }
粤ICP备19079148号