Skip to content

Commit

Permalink
Merge pull request #100 from yelmontaser/feature_custom_listener
Browse files Browse the repository at this point in the history
Add authentication_listener option
  • Loading branch information
slashfan committed Oct 21, 2015
2 parents 710e589 + d98d0a2 commit b0b10db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DependencyInjection/Security/Factory/JWTFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function create(ContainerBuilder $container, $id, $config, $userProvider,

$listenerId = 'security.authentication.listener.jwt.' . $id;
$container
->setDefinition($listenerId, new DefinitionDecorator('lexik_jwt_authentication.security.authentication.listener'))
->setDefinition($listenerId, new DefinitionDecorator($config['authentication_listener']))
->replaceArgument(2, $config);

$entryPointId = $defaultEntryPoint;
Expand Down Expand Up @@ -142,6 +142,8 @@ public function addConfiguration(NodeDefinition $node)
->end()
->scalarNode('authentication_provider')
->defaultValue('lexik_jwt_authentication.security.authentication.provider')
->scalarNode('authentication_listener')
->defaultValue('lexik_jwt_authentication.security.authentication.listener')
->end()
->end();
}
Expand Down
1 change: 1 addition & 0 deletions Resources/doc/1-configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ firewalls:
throw_exceptions: false # When an authentication failure occurs, return a 401 response immediately
create_entry_point: true # When no authentication details are provided, create a default entry point that returns a 401 response
authentication_provider: lexik_jwt_authentication.security.authentication.provider
authentication_listener: lexik_jwt_authentication.security.authentication.listener
```

0 comments on commit b0b10db

Please sign in to comment.