You are here

static function handler::miniorange_oauth_client_validate_clientSecret in OAuth2 Login 8

File

src/handler.php, line 115

Class

handler

Namespace

Drupal\oauth2_login

Code

static function miniorange_oauth_client_validate_clientSecret($client_secret) {
  $secret_stored = \Drupal::config('oauth2_login.settings')
    ->get('miniorange_oauth_client_client_secret');
  if ($secret_stored != '') {
    if ($client_secret != $secret_stored) {
      print_r('Client Secret mismatch');
      exit;
    }
  }
  else {
    print_r('Client Secret is not configured');
    exit;
  }
}