static function handler::miniorange_oauth_client_validate_code in Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login 8
File
- src/
handler.php, line 15
Class
Namespace
Drupal\miniorange_oauth_clientCode
static function miniorange_oauth_client_validate_code($code, $request_code, $request_time) {
$current_time = time();
if ($current_time - $request_time >= 400) {
echo "Your authentication code has expired. Please try again.";
exit;
}
if ($code == $request_code) {
//variable_set('miniorange_oauth_client_code','');
\Drupal::configFactory()
->getEditable('miniorange_oauth_client.settings')
->set('miniorange_oauth_client_code', '')
->save();
}
else {
print_r("Incorrect Code");
exit;
}
}