public function startLtiSession(common_http_Request $request)
    {
        try {
            /** @var FactoryLtiAuthAdapterService $factoryAuth */
            $factoryAuth = $this->getServiceLocator()->get(FactoryLtiAuthAdapterServiceInterface::SERVICE_ID);
            $adapter     = $factoryAuth->create($request);

            $user = $adapter->authenticate();

            $session = new TaoLtiSession($user);

            $this->getServiceLocator()->propagate($session);
            common_session_SessionManager::startSession($session);
        } catch (LtiInvalidVariableException $e) {
            $this->getServiceLocator()
                ->get(LoggerService::SERVICE_ID)
                ->log(LogLevel::INFO, $e->getMessage());

            throw new LtiException(
                __('You are not authorized to use this system'),
                LtiErrorMessage::ERROR_UNAUTHORIZED
            );
        }
    }
public function startLtiSession(common_http_Request $request)
    {
        try {
            /** @var FactoryLtiAuthAdapterService $factoryAuth */
            $factoryAuth = $this->getServiceLocator()->get(FactoryLtiAuthAdapterServiceInterface::SERVICE_ID);
            $adapter     = $factoryAuth->create($request);

            $user = $adapter->authenticate();

            $session = new TaoLtiSession($user);

            $this->getServiceLocator()->propagate($session);
            common_session_SessionManager::startSession($session);
        } catch (LtiInvalidVariableException $e) {
            $this->getServiceLocator()
                ->get(LoggerService::SERVICE_ID)
                ->log(LogLevel::INFO, $e->getMessage());

            throw new LtiException(
                __('You are not authorized to use this system'),
                LtiErrorMessage::ERROR_UNAUTHORIZED
            );
        }
    }
public function startLtiSession ( common_http_Request $ request ) { try { /** @var FactoryLtiAuthAdapterService $factoryAuth */ $ factoryAuth = $ this -> getServiceLocator ( ) -> get ( FactoryLtiAuthAdapterServiceInterface :: SERVICE_ID ) ; $ adapter = $ factoryAuth -> create ( $ request ) ; $ user = $ adapter -> authenticate ( ) ; $ session = new TaoLtiSession ( $ user ) ; $ this -> getServiceLocator ( ) -> propagate ( $ session ) ; common_session_SessionManager :: startSession ( $ session ) ; } catch ( LtiInvalidVariableException $ e ) { $ this -> getServiceLocator ( ) -> get ( LoggerService :: SERVICE_ID ) -> log ( LogLevel :: INFO , $ e -> getMessage ( ) ) ; throw new LtiException ( __ ( 'You are not authorized to use this system' ) , LtiErrorMessage :: ERROR_UNAUTHORIZED ) ; } }
start a session from the provided OAuth Request

@param common_http_Request $request

@throws LtiException
@throws common_Exception
@throws \ResolverException
start a session from the provided OAuth Request