You are here

function jwt_requirements in JSON Web Token Authentication (JWT) 8

Same name and namespace in other branches
  1. 8.0 jwt.install \jwt_requirements()

Implements hook_requirements().

File

./jwt.install, line 11
Install, update, and uninstall functions for the jwt module.

Code

function jwt_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!class_exists('\\Firebase\\JWT\\JWT')) {
      $requirements['jwt_library'] = [
        'description' => t('JWT Authentication requires the firebase/php-jwt library.'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}