protected function registerEntryPoint(\Silex\Application $app)
    {
        $entry_point       = 'security.entry_point.'.$this->name.
            (empty($this->loginPath) ? '.http' : '.form');
        $app[$entry_point] = $app->share(function () use ($app) {
            return $this->loginPath ?
                new FormAuthenticationEntryPoint($app, $app['security.http_utils'], $this->loginPath, true)
                    :
                new BasicAuthenticationEntryPoint('Secured');
        });
        return $entry_point;
    }
protected function registerEntryPoint(\Silex\Application $app)
    {
        $entry_point       = 'security.entry_point.'.$this->name.
            (empty($this->loginPath) ? '.http' : '.form');
        $app[$entry_point] = $app->share(function () use ($app) {
            return $this->loginPath ?
                new FormAuthenticationEntryPoint($app, $app['security.http_utils'], $this->loginPath, true)
                    :
                new BasicAuthenticationEntryPoint('Secured');
        });
        return $entry_point;
    }
protected function registerEntryPoint ( \ Silex \ Application $ app ) { $ entry_point = 'security.entry_point.' . $ this -> name . ( empty ( $ this -> loginPath ) ? '.http' : '.form' ) ; $ app [ $ entry_point ] = $ app -> share ( function ( ) use ( $ app ) { return $ this -> loginPath ? new FormAuthenticationEntryPoint ( $ app , $ app [ 'security.http_utils' ] , $ this -> loginPath , true ) : new BasicAuthenticationEntryPoint ( 'Secured' ) ; } ) ; return $ entry_point ; }
Register Entry Point
@param \Silex\Application $app
Register Entry Point