[TYPO3-mvc] tx_sv_authbase Authentication Service and ExtBase - TS Configuration Problems

Claus Due claus at wildside.dk
Mon Dec 19 18:06:20 CET 2011


Hi Alexander,

Perhaps you could make this work by compiling your own Request, initializing your Controller instance and running processRequest() on it. You may need to duplicate part of what goes on in the Bootstrap if you need your ConfigurationManager etc. present. In any case it's better than setting the $_GET variables manually and I don't know of any other way to manipulate those w/o GET/POST other than manually compiling your Request and sending it to the controller.

Perhaps you would even prefer to use a CommandController - argument handling is somewhat easier with it and it's a bit faster, it also can be scheduled (it's in FED right now and in will be in the next version of Extbase) using scheduler [1]. The link also contians some basic info about CommandControllers.

Cheers,
Claus

[1] http://fedext.net/features/scheduler-tasks/explanation/

On Dec 19, 2011, at 5:54 PM, Alexander heim wrote:

> I'm working at an additional Authentication Service for Typo3. I want to keep the authentication part as small as possible and created an extbase extension, which is doing most of the stuff. This works fine, except some problems, I could workaround.
> But one problem still exists. At the moment I have to set storagePid and newRecordStoragePid inside my code. I tried to use the Tx_Extbase_Core_Bootstrap to initialize Extbase with some dummy plugin, controller, action stuff. I checked some of the examples for using the scheduler with some TSFE intializations and so on. Nothing worked. Maybe I forgot something or maybe I made some mistakes.
> Has someone tried already to use an extbase extension from an implementation of Authentication Service?
> 
> Some code:
> 
> 	protected $storagePid = 9;
> 	protected $newRecordStoragePid = 9;
> 
> 	function initSomeTypo3Stuff() {
> 		if (empty($GLOBALS['TSFE']->sys_page)) {
> 			$GLOBALS['TSFE']->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
> 		}
> 
> 		if (empty($GLOBALS['TSFE']->tmpl)) {
> 
> 			$GLOBALS['TSFE']->tmpl = t3lib_div::makeInstance('t3lib_tstemplate');
> 
> 		}
> 
> 	}
> 
> 	function initExtbase() {
> 
> 		$configuration = array(
> 
> 			'extensionName' =>  "extensionname",
> 
> 			'pluginName' =>  "pi1",
> 
> 			//'persistence' =>  '<  module.tx_extensionname.persistence',
> 
> 			'persistence.'=>array('storagePid'=>$this->storagePid,'newRecordStoragePid'=>$this->newRecordStoragePid),
> 
> 			'switchableControllerActions' =>  array(
> 
> 				'BusinessUnits' =>  array('index'),
> 
> 			)
> 
> 		);
> 
> 
> 		$_SERVER['REQUEST_METHOD'] = 'GET';
> 
> 		$_GET['tx_extensionname_pi1']['controller'] = 'BusinessUnits';
> 
> 		$_GET['tx_extensionname_pi1']['action'] = 'index';
> 
> 		$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['extensionname']['modules']['pi1']['controllers'] = array(
> 
> 			'BusinessUnits' =>  array(
> 
> 				'actions' =>  array('index')
> 
> 			),
> 
> 		);
> 
> 	
> 		
> 
> 		$this->extbaseBootstrap = t3lib_div::makeInstance('Tx_Extbase_Core_Bootstrap');
> 
> 		$this->extbaseBootstrap->initialize($configuration);
> 
> 	}
> 
> 	function init() {
> 
> 		$available = parent::init();
> 
>    		$this->initSomeTypo3Stuff();
> 
>    		$this->initExtbase();
> 	}
> 
> 
> 
> ------
> 
> at TS is written:
> 
> plugin.tx_extensionname.persistence.storagePid = 9
> plugin.tx_extensionname.persistence.newRecordStoragePid = 9
> module.tx_extensionname.persistence.storagePid = 9
> module.tx_extensionname.persistence.newRecordStoragePid = 9
> 
> ------
> 
> and ext_localconf.php ... but this configuration is more like a dummy. I do not need any plugin at all.
> 
> Tx_Extbase_Utility_Extension::configurePlugin(
> 	$_EXTKEY,
> 	'pi1',
> 	array(
> 		'BusinessUnits' =>  'index'
> 	),
> 	array(
> 		'BusinessUnits' =>  'index'
> 	)
> 	
> 	
> );
> 
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list