src/Entity/OAuth/Client.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity\OAuth;
  3. use App\Repository\OAuth\ClientRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use FOS\OAuthServerBundle\Entity\Client as BaseClient;
  6. #[ORM\Entity(repositoryClass: ClientRepository::class), ORM\Table(name: 'oauth_client')]
  7. class Client extends BaseClient
  8. {
  9. #[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
  10. protected $id;
  11. #[ORM\Column(type: 'boolean')]
  12. private bool $autoAccept = false;
  13. // Used to distinguish TUA from other oauth clients
  14. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  15. private bool $external = false;
  16. #[ORM\Column(type: 'string', length: 255, nullable: false)]
  17. private string $defaultSubdomain;
  18. public function getDefaultSubdomain(): string
  19. {
  20. return $this->defaultSubdomain;
  21. }
  22. public function isAutoAccept(): bool
  23. {
  24. return $this->autoAccept;
  25. }
  26. public function setAutoAccept(bool $autoAccept): self
  27. {
  28. $this->autoAccept = $autoAccept;
  29. return $this;
  30. }
  31. public function isExternal(): bool
  32. {
  33. return $this->external;
  34. }
  35. public function setExternal(bool $external): self
  36. {
  37. $this->external = $external;
  38. return $this;
  39. }
  40. }