1 | <?php |
||
2 | |||
3 | namespace Happyr\Auth0Bundle\DependencyInjection; |
||
4 | |||
5 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
||
6 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
||
7 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
||
8 | |||
9 | /** |
||
10 | * This is the class that validates and merges configuration from your app/config files. |
||
11 | */ |
||
12 | class Configuration implements ConfigurationInterface |
||
13 | { |
||
14 | /** |
||
15 | * {@inheritdoc} |
||
16 | */ |
||
17 | public function getConfigTreeBuilder() |
||
18 | { |
||
19 | $treeBuilder = new TreeBuilder('happyr_auth0'); |
||
20 | /** @var ArrayNodeDefinition $root */ |
||
21 | $root = $treeBuilder->getRootNode(); |
||
22 | |||
23 | $root |
||
24 | ->children() |
||
25 | ->scalarNode('domain')->isRequired()->cannotBeEmpty()->end() |
||
26 | ->scalarNode('login_domain')->defaultNull()->info('If you configured SSO with a custom domain.')->end() |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
27 | ->scalarNode('client_id')->isRequired()->cannotBeEmpty()->end() |
||
28 | ->scalarNode('client_secret')->isRequired()->cannotBeEmpty()->end() |
||
29 | ->scalarNode('cache')->defaultNull()->end() |
||
30 | ->scalarNode('httplug_client_service')->defaultNull()->end() |
||
31 | ->scalarNode('scope')->defaultValue('')->info('Seperated with space')->end() |
||
32 | ->scalarNode('audience')->defaultNull()->end() |
||
33 | ->arrayNode('firewall')->canBeEnabled() |
||
34 | ->children() |
||
35 | ->scalarNode('check_route')->isRequired()->info('The route where the user ends up after authentication. Ie, the callback route.')->cannotBeEmpty()->end() |
||
36 | ->scalarNode('failure_path')->defaultNull()->info('The path or route where user is redirected on authentication failure.')->end() |
||
37 | ->scalarNode('failure_handler')->defaultNull()->info('A service implementing AuthenticationFailureHandlerInterface.')->end() |
||
38 | ->scalarNode('default_target_path')->defaultNull()->info('The path or route where user is redirected on authentication success.')->end() |
||
39 | ->scalarNode('success_handler')->defaultNull()->info('A service implementing AuthenticationSuccessHandlerInterface.')->end() |
||
40 | ->scalarNode('user_provider')->defaultNull()->info('A service implementing Auth0UserProviderInterface. If none provided, the user provider of the firewall will be used.')->end() |
||
41 | ->end() |
||
42 | ->end() |
||
43 | |||
44 | ->end(); |
||
45 | |||
46 | return $treeBuilder; |
||
47 | } |
||
48 | } |
||
49 |