protected function validateLtiParams(LtiLaunchData $launchData)
    {
        if ($launchData->hasVariable(self::CUSTOM_LTI_SECURE)) {
            $val = mb_strtolower($launchData->getVariable(self::CUSTOM_LTI_SECURE));
            if ($val !== 'true' && $val !== 'false') {
                throw new LtiException(
                    __('Wrong value of "secure" variable.'),
                    LtiErrorMessage::ERROR_INVALID_PARAMETER
                );
            }
        }
    }