1

I was able to define my own authentication service with Zend\Authentication. Now I want to be able to change the session timeout limit. I don't want to change the general session config but only for this Authentication manager. As I want to reuse this adapter, I want to find a way to do it through the module.config.php configuration file.

For the moment, I am creating my service like that

public function getServiceConfig()
    {
        return array(
        'factories' => array(

            'cas_auth_service' => function ($sm) {
                $authService = new \Zend\Authentication\AuthenticationService;
                $authService->setAdapter($sm->get('\CasAuthen\Authentication\Adapter\Cas'));
                return $authService;
            },
        ),
    );
}

I was thinking about creating my own Authentication Storage adapter and then injecting it but I don"t know if it is the right way to do it.

Does anymore know how to proceed ?

Thank you in advance and have a nice day.

Parktrip
  • 61
  • 4
  • [Possible duplicate](https://stackoverflow.com/questions/12774809/how-to-bootstrap-sessions-in-zend-framework-2) – AlexP Jun 13 '14 at 09:55
  • Hi AlexP. For me, the two topics are completly differents as the one you mentioned is about configurating the session settings for the whole application with a configuration file. Mine is about configuring the session settings for a specific authentication service via the StorageInterface. – Parktrip Jun 16 '14 at 06:35
  • see this [post](http://www.bart-konieczny.com/fr/blog/zend-framework-2/authentification-de-zend-framework-2) it explains how to define custom authentication. May be you'll find the answer to your question. It's written in french but you can still translate it ;-) – blackbishop Aug 12 '14 at 11:26

0 Answers0