CustomOAuthUser.php 810 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. * @var array
  12. */
  13. protected $tenancies = array();
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public function getRoles()
  18. {
  19. return $this->roles;
  20. }
  21. /**
  22. * @param array $roles
  23. */
  24. public function setRoles($roles)
  25. {
  26. $this->roles = $roles;
  27. }
  28. /**
  29. * @return array
  30. */
  31. public function getTenancies()
  32. {
  33. return $this->tenancies;
  34. }
  35. /**
  36. * @param array $tenancies
  37. */
  38. public function setTenancies($tenancies)
  39. {
  40. $this->tenancies = $tenancies;
  41. }
  42. }