public function createSessionFromRequest($request, $resolver)
    {
        if (!$this->isRestController($resolver)) {
            return false;
        }
        /** @var SessionBuilder $builder */
        foreach ($this->getSessionBuilders() as $builder) {
            if ($builder->isApplicable($request)) {
                return $this->startSession($builder->getSession($request));
            }
        }
        throw new LoginFailedException(array('Request cannot be authenticated.'));
    }
public function createSessionFromRequest($request, $resolver)
    {
        if (!$this->isRestController($resolver)) {
            return false;
        }
        /** @var SessionBuilder $builder */
        foreach ($this->getSessionBuilders() as $builder) {
            if ($builder->isApplicable($request)) {
                return $this->startSession($builder->getSession($request));
            }
        }
        throw new LoginFailedException(array('Request cannot be authenticated.'));
    }
public function createSessionFromRequest ( $ request , $ resolver ) { if ( ! $ this -> isRestController ( $ resolver ) ) { return false ; } /** @var SessionBuilder $builder */ foreach ( $ this -> getSessionBuilders ( ) as $ builder ) { if ( $ builder -> isApplicable ( $ request ) ) { return $ this -> startSession ( $ builder -> getSession ( $ request ) ) ; } } throw new LoginFailedException ( array ( 'Request cannot be authenticated.' ) ) ; }
Create a rest session based on builders.

Give the request and resolver to builder to know if it is applicable
If yes, create and start the session from it

@param $request
@param $resolver
@return bool
@throws LoginFailedException
Create a rest session based on builders .