CustomOAuthUser.php 583 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Base\OAuthClientBundle\Security\Core\User;
  3. use HWI\Bundle\OAuthBundle\Security\Core\User\OAuthUser;
  4. class CustomOAuthUser extends OAuthUser
  5. {
  6. /**
  7. * @var array
  8. */
  9. protected $roles = array('ROLE_USER');
  10. /**
  11. * @return int
  12. */
  13. public function getId()
  14. {
  15. return $this->id;
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function getRoles()
  21. {
  22. return $this->roles;
  23. }
  24. /**
  25. * @param array $roles
  26. */
  27. public function setRoles($roles)
  28. {
  29. $this->roles = $roles;
  30. }
  31. }