You are here

protected function TokenAuthUser::getRoleStorage in Simple OAuth (OAuth2) & OpenID Connect 5.x

Same name and namespace in other branches
  1. 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getRoleStorage()
  2. 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getRoleStorage()
  3. 8.3 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getRoleStorage()

Returns the role storage object.

Return value

\Drupal\user\RoleStorageInterface The role storage object.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

File

src/Authentication/TokenAuthUser.php, line 107

Class

TokenAuthUser
The decorated user class with token information.

Namespace

Drupal\simple_oauth\Authentication

Code

protected function getRoleStorage() {

  /** @var \Drupal\user\RoleStorageInterface $storage */
  $storage = \Drupal::entityTypeManager()
    ->getStorage('user_role');
  return $storage;
}