protected function GoogleAuth::validateConfig in Social Auth Google 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Network/GoogleAuth.php \Drupal\social_auth_google\Plugin\Network\GoogleAuth::validateConfig()
Checks that module is configured.
Parameters
\Drupal\social_auth_google\Settings\GoogleAuthSettings $settings: The Google auth settings.
Return value
bool True if module is configured. False otherwise.
1 call to GoogleAuth::validateConfig()
- GoogleAuth::initSdk in src/
Plugin/ Network/ GoogleAuth.php - Sets the underlying SDK library.
File
- src/
Plugin/ Network/ GoogleAuth.php, line 83
Class
- GoogleAuth
- Defines a Network Plugin for Social Auth Google.
Namespace
Drupal\social_auth_google\Plugin\NetworkCode
protected function validateConfig(GoogleAuthSettings $settings) {
$client_id = $settings
->getClientId();
$client_secret = $settings
->getClientSecret();
if (!$client_id || !$client_secret) {
$this->loggerFactory
->get('social_auth_google')
->error('Define Client ID and Client Secret on module settings.');
return FALSE;
}
return TRUE;
}