merged branch davedevelopment/security-authentication-factories (PR #385)
Commits ------- e408ca41 Pulled standard auth mechanisms in to extendable factories Discussion ---------- Pull standard auth mechanisms in to extendable factories I'm not really too sure about this implementation myself, but it got me where I needed to be, in that I can define a factory for a custom authentication provider and list the type in the firewall config, something like this: ``` php <?php $app['security.firewalls'] = array( 'api' => array( 'pattern' => '^/api', 'wsse' => true, 'anonymous' => true, ), ); $app['security.authentication.factory.wsse'] = $app->protect(function ($name, $options) use ($app) { $app['security.entry_point.wsse.'.$name] = new WsseEntryPoint(...); return array(new WsseListener(...), 'wsse'); }); ``` I can't see any particular use case for overriding the standard factories (particularly because the _proto functions are there to override) but they are there if someone comes up with one, and it seemed to make things neater in the block building the firewall map. I've got enough here so that I can move on with my project, if this approach is good enough, I can refine it as necessary, if not, any guidance would be appreciated and I'll work on something better.
Showing
Please register or sign in to comment