You are here

public function KeyAuth::access in Key auth 8

Determine if a user has access to use key authentication.

Parameters

\Drupal\user\UserInterface $user: The user being authenticated.

Return value

bool TRUE if the user has access, otherwise FALSE.

Overrides KeyAuthInterface::access

File

src/KeyAuth.php, line 111

Class

KeyAuth
Class KeyAuth.

Namespace

Drupal\key_auth

Code

public function access(UserInterface $user) {
  return $user
    ->hasPermission('use key authentication');
}