ScopeEntity.php 520 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace oauth2\entity;
  3. use League\OAuth2\Server\Entities\ScopeEntityInterface;
  4. use League\OAuth2\Server\Entities\Traits\EntityTrait;
  5. /**
  6. * Class ScopeEntity
  7. * @package oauth2\entity
  8. * @author jianyan74 <751393839@qq.com>
  9. */
  10. class ScopeEntity implements ScopeEntityInterface
  11. {
  12. use EntityTrait;
  13. // 没有 Trait 实现这个方法,需要自行实现
  14. // oauth2-server 项目的测试代码的实现例子
  15. public function jsonSerialize()
  16. {
  17. return $this->getIdentifier();
  18. }
  19. }
粤ICP备19079148号