I have this config:
'zf-mvc-auth' => [
'authentication' => [
'map' => [
'ZF\\OAuth2' => 'session',
],
'adapters' => [
'session' => [
'adapter' => 'Application\\Authentication\\Adapter\\SessionAdapter',
],
],
],
],
I need 2 APIs at the same site: one for admin and one for actually the site. It means I need 2 different session adapters for apigility. It looks like I can override config inside init(ModuleManager $moduleManager) method of Module.php but how to access to router in this method?
I need this checking:
if($matchedRouteName == 'admin' || strpos($matchedRouteName, 'admin/') === 0){
to set appropriate map key ‘ZF\OAuth2’. How to do that?