/**
* @param ArrayNodeDefinition $builder
*/ publicfunctionaddConfiguration(NodeDefinition $builder): void { $builder ->children() ->scalarNode('limiter')->info(sprintf('A service id implementing "%s".', RequestRateLimiterInterface::class))->end() ->integerNode('max_attempts')->defaultValue(5)->end() ->scalarNode('interval')->defaultValue('1 minute')->end() ->scalarNode('lock_factory')->info('The service ID of the lock factory used by the login rate limiter (or null to disable locking)')->defaultNull()->end() ->end(); }
->min(0) ->defaultValue(1) ->end() ->integerNode('max_string_length') ->info('Max length of displayed strings, -1 means no limit') ->min(-1) ->defaultValue(-1) ->end() ->scalarNode('dump_destination') ->info('A stream URL where dumps should be written to') ->example('php://stderr, or tcp://%env(VAR_DUMPER_SERVER)% when using the "server:dump" command') ->defaultNull() ->end() ->enumNode('theme') ->info('Changes the color of the dump() output when rendered directly on the templating. "dark" (default) or "light"') ->example('dark') ->values(['dark', 'light']) ->defaultValue('dark') ->end() ;
return$treeBuilder; } }
/**
* Generates the configuration tree builder.
*/ publicfunctiongetConfigTreeBuilder(): TreeBuilder { $tb = newTreeBuilder('security'); $rootNode = $tb->getRootNode();
->isRequired() ->prototype('scalar')->end() ->requiresAtLeastOneElement() ->info('An array of properties on your User that are used to sign the link. If any of these change, all existing links will become invalid.') ->example(['email', 'password']) ->end() ->integerNode('lifetime') ->defaultValue(600) ->info('The lifetime of the login link in seconds.') ->end() ->integerNode('max_uses') ->defaultNull() ->info('Max number of times a login link can be used - null means unlimited within lifetime.') ->end() ->scalarNode('used_link_cache') ->info('Cache service id used to expired links of max_uses is set.') ->end() ->scalarNode('success_handler') ->info(sprintf('A service id that implements %s.', AuthenticationSuccessHandlerInterface::class)) ->end() ->scalarNode('failure_handler') ->info(sprintf('A service id that implements %s.', AuthenticationFailureHandlerInterface::class)) ->end()