protected function validate($request, $user, $password, $routeUsername = null, $routePassword = null)
    {
        // If we're dealing with a route with a route specific restriction, it takes priortity over global restriction.
        if ($this->specificRouteRestrictionExists()) {

            // If we have a route specific username and password, check against them.
            if ($routeUsername && $routePassword) {

                // Check against route password
                if (trim($user) == $routeUsername && trim($password) == $routePassword) {
                    return true;
                } else {
                    return false;
                }

            }
        }
        // Check if global username and password are set
        elseif (($globalUsername = config('laravel-route-restrictor.global.username')) && ($globalPassword = config('laravel-route-restrictor.global.password'))) {
            
            // Check against global password
            if (trim($user) == $globalUsername && trim($password) == $globalPassword) {
                return true;
            } else {
                return false;
            }
        }

        return true;
    }