public function launch()
    {
        try {
            $request = common_http_Request::currentRequest();
            $ltiLaunchData = LtiLaunchData::fromRequest($request);
            /** @var LtiValidatorService $validator */
            $validator = $this->getServiceLocator()->get(LtiValidatorService::SERVICE_ID);
            $validator->validateLaunchData($ltiLaunchData);

            LtiService::singleton()->startLtiSession($request);


            /** @var CookieVerifyService $cookieService */
            $cookieService = $this->getServiceManager()->get(CookieVerifyService::SERVICE_ID);
            if ($cookieService->isVerifyCookieRequired()) {
                if (tao_models_classes_accessControl_AclProxy::hasAccess('verifyCookie', 'CookieUtils', 'taoLti')) {
                    $cookieRedirect = _url(
                        'verifyCookie',
                        'CookieUtils',
                        'taoLti',
                        [
                            'session' => session_id(),
                            'redirect' => urlencode(_url('run', null, null, $_GET)),
                        ]
                    );
                    $this->redirect($cookieRedirect);
                } else {
                    throw new LtiException(
                        __('You are not authorized to use this system'),
                        LtiErrorMessage::ERROR_UNAUTHORIZED
                    );
                }
            } else {
                $this->forward('run', null, null, $_GET);
            }
        } catch (common_user_auth_AuthFailedException $e) {
            common_Logger::i($e->getMessage());
            throw new LtiException(
                __('The LTI connection could not be established'),
                LtiErrorMessage::ERROR_UNAUTHORIZED
            );
        } catch (LtiException $e) {
            common_Logger::i($e->__toString());

            if (tao_helpers_Request::isAjax()) {
                throw new common_exception_IsAjaxAction(__CLASS__ . '::' . __FUNCTION__);
            }
            throw $e;
        } catch (tao_models_classes_oauth_Exception $e) {
            common_Logger::i($e->getMessage());
            throw new LtiException(
                __('The LTI connection could not be established'),
                LtiErrorMessage::ERROR_UNAUTHORIZED
            );
        }
    }
public function launch()
    {
        try {
            $request = common_http_Request::currentRequest();
            $ltiLaunchData = LtiLaunchData::fromRequest($request);
            /** @var LtiValidatorService $validator */
            $validator = $this->getServiceLocator()->get(LtiValidatorService::SERVICE_ID);
            $validator->validateLaunchData($ltiLaunchData);

            LtiService::singleton()->startLtiSession($request);


            /** @var CookieVerifyService $cookieService */
            $cookieService = $this->getServiceManager()->get(CookieVerifyService::SERVICE_ID);
            if ($cookieService->isVerifyCookieRequired()) {
                if (tao_models_classes_accessControl_AclProxy::hasAccess('verifyCookie', 'CookieUtils', 'taoLti')) {
                    $cookieRedirect = _url(
                        'verifyCookie',
                        'CookieUtils',
                        'taoLti',
                        [
                            'session' => session_id(),
                            'redirect' => urlencode(_url('run', null, null, $_GET)),
                        ]
                    );
                    $this->redirect($cookieRedirect);
                } else {
                    throw new LtiException(
                        __('You are not authorized to use this system'),
                        LtiErrorMessage::ERROR_UNAUTHORIZED
                    );
                }
            } else {
                $this->forward('run', null, null, $_GET);
            }
        } catch (common_user_auth_AuthFailedException $e) {
            common_Logger::i($e->getMessage());
            throw new LtiException(
                __('The LTI connection could not be established'),
                LtiErrorMessage::ERROR_UNAUTHORIZED
            );
        } catch (LtiException $e) {
            common_Logger::i($e->__toString());

            if (tao_helpers_Request::isAjax()) {
                throw new common_exception_IsAjaxAction(__CLASS__ . '::' . __FUNCTION__);
            }
            throw $e;
        } catch (tao_models_classes_oauth_Exception $e) {
            common_Logger::i($e->getMessage());
            throw new LtiException(
                __('The LTI connection could not be established'),
                LtiErrorMessage::ERROR_UNAUTHORIZED
            );
        }
    }
public function launch ( ) { try { $ request = common_http_Request :: currentRequest ( ) ; $ ltiLaunchData = LtiLaunchData :: fromRequest ( $ request ) ; /** @var LtiValidatorService $validator */ $ validator = $ this -> getServiceLocator ( ) -> get ( LtiValidatorService :: SERVICE_ID ) ; $ validator -> validateLaunchData ( $ ltiLaunchData ) ; LtiService :: singleton ( ) -> startLtiSession ( $ request ) ; /** @var CookieVerifyService $cookieService */ $ cookieService = $ this -> getServiceManager ( ) -> get ( CookieVerifyService :: SERVICE_ID ) ; if ( $ cookieService -> isVerifyCookieRequired ( ) ) { if ( tao_models_classes_accessControl_AclProxy :: hasAccess ( 'verifyCookie' , 'CookieUtils' , 'taoLti' ) ) { $ cookieRedirect = _url ( 'verifyCookie' , 'CookieUtils' , 'taoLti' , [ 'session' => session_id ( ) , 'redirect' => urlencode ( _url ( 'run' , null , null , $ _GET ) ) , ] ) ; $ this -> redirect ( $ cookieRedirect ) ; } else { throw new LtiException ( __ ( 'You are not authorized to use this system' ) , LtiErrorMessage :: ERROR_UNAUTHORIZED ) ; } } else { $ this -> forward ( 'run' , null , null , $ _GET ) ; } } catch ( common_user_auth_AuthFailedException $ e ) { common_Logger :: i ( $ e -> getMessage ( ) ) ; throw new LtiException ( __ ( 'The LTI connection could not be established' ) , LtiErrorMessage :: ERROR_UNAUTHORIZED ) ; } catch ( LtiException $ e ) { common_Logger :: i ( $ e -> __toString ( ) ) ; if ( tao_helpers_Request :: isAjax ( ) ) { throw new common_exception_IsAjaxAction ( __CLASS__ . '::' . __FUNCTION__ ) ; } throw $ e ; } catch ( tao_models_classes_oauth_Exception $ e ) { common_Logger :: i ( $ e -> getMessage ( ) ) ; throw new LtiException ( __ ( 'The LTI connection could not be established' ) , LtiErrorMessage :: ERROR_UNAUTHORIZED ) ; } }
Entrypoint of every tool

@throws LtiException
@throws ResolverException
@throws common_Exception
@throws common_exception_Error
Entrypoint of every tool