BookStack\Services\SocialAuthService::validateDriver PHP Method

validateDriver() private method

Ensure the social driver is correct and supported.
private validateDriver ( $socialDriver ) : string
$socialDriver
return string
    private function validateDriver($socialDriver)
    {
        $driver = trim(strtolower($socialDriver));
        if (!in_array($driver, $this->validSocialDrivers)) {
            abort(404, 'Social Driver Not Found');
        }
        if (!$this->checkDriverConfigured($driver)) {
            throw new SocialDriverNotConfigured("Your {$driver} social settings are not configured correctly.");
        }
        return $driver;
    }