You are here

protected function LinkedInAuth::validateConfig in Open Social 8.5

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  2. 8 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  3. 8.2 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  4. 8.3 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  5. 8.4 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  6. 8.6 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  7. 8.7 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()
  8. 8.8 modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php \Drupal\social_auth_linkedin\Plugin\Network\LinkedInAuth::validateConfig()

Checks that module is configured.

Parameters

\Drupal\social_auth_linkedin\Settings\LinkedInAuthSettings $settings: The LinkedIn auth settings.

Return value

bool True if module is configured, False otherwise.

1 call to LinkedInAuth::validateConfig()
LinkedInAuth::initSdk in modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php
Returns an instance of sdk.

File

modules/custom/social_auth_linkedin/src/Plugin/Network/LinkedInAuth.php, line 98

Class

LinkedInAuth
Defines a Network Plugin for Social Auth LinkedIn.

Namespace

Drupal\social_auth_linkedin\Plugin\Network

Code

protected function validateConfig(LinkedInAuthSettings $settings) {
  $client_id = $settings
    ->getClientId();
  $client_secret = $settings
    ->getClientSecret();
  if (!$client_id || !$client_secret) {
    $this->loggerFactory
      ->get('social_auth_linkedin')
      ->error('Define Client ID and Client Secret on module settings.');
    return FALSE;
  }
  return TRUE;
}