You are here

static function handler::miniorange_oauth_client_validate_clientSecret in Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login 8

File

src/handler.php, line 42

Class

handler

Namespace

Drupal\miniorange_oauth_client

Code

static function miniorange_oauth_client_validate_clientSecret($client_secret) {
  $secret_stored = \Drupal::config('miniorange_oauth_client.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;
  }
}