Initial Base

This commit is contained in:
2025-10-31 22:07:28 +00:00
parent 629a58b595
commit 3ace0308cf
717 changed files with 107359 additions and 0 deletions

View File

@@ -0,0 +1,282 @@
<?php
namespace Symfony\Config\Security;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class AccessControlConfig
{
private $requestMatcher;
private $requiresChannel;
private $path;
private $host;
private $port;
private $ips;
private $attributes;
private $route;
private $methods;
private $allowIf;
private $roles;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function requestMatcher($value): static
{
$this->_usedProperties['requestMatcher'] = true;
$this->requestMatcher = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function requiresChannel($value): static
{
$this->_usedProperties['requiresChannel'] = true;
$this->requiresChannel = $value;
return $this;
}
/**
* Use the urldecoded format.
* @example ^/path to resource/
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function path($value): static
{
$this->_usedProperties['path'] = true;
$this->path = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function host($value): static
{
$this->_usedProperties['host'] = true;
$this->host = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|int $value
* @return $this
*/
public function port($value): static
{
$this->_usedProperties['port'] = true;
$this->port = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function ips(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['ips'] = true;
$this->ips = $value;
return $this;
}
/**
* @return $this
*/
public function attribute(string $key, mixed $value): static
{
$this->_usedProperties['attributes'] = true;
$this->attributes[$key] = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function route($value): static
{
$this->_usedProperties['route'] = true;
$this->route = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function methods(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['methods'] = true;
$this->methods = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function allowIf($value): static
{
$this->_usedProperties['allowIf'] = true;
$this->allowIf = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function roles(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['roles'] = true;
$this->roles = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('request_matcher', $value)) {
$this->_usedProperties['requestMatcher'] = true;
$this->requestMatcher = $value['request_matcher'];
unset($value['request_matcher']);
}
if (array_key_exists('requires_channel', $value)) {
$this->_usedProperties['requiresChannel'] = true;
$this->requiresChannel = $value['requires_channel'];
unset($value['requires_channel']);
}
if (array_key_exists('path', $value)) {
$this->_usedProperties['path'] = true;
$this->path = $value['path'];
unset($value['path']);
}
if (array_key_exists('host', $value)) {
$this->_usedProperties['host'] = true;
$this->host = $value['host'];
unset($value['host']);
}
if (array_key_exists('port', $value)) {
$this->_usedProperties['port'] = true;
$this->port = $value['port'];
unset($value['port']);
}
if (array_key_exists('ips', $value)) {
$this->_usedProperties['ips'] = true;
$this->ips = $value['ips'];
unset($value['ips']);
}
if (array_key_exists('attributes', $value)) {
$this->_usedProperties['attributes'] = true;
$this->attributes = $value['attributes'];
unset($value['attributes']);
}
if (array_key_exists('route', $value)) {
$this->_usedProperties['route'] = true;
$this->route = $value['route'];
unset($value['route']);
}
if (array_key_exists('methods', $value)) {
$this->_usedProperties['methods'] = true;
$this->methods = $value['methods'];
unset($value['methods']);
}
if (array_key_exists('allow_if', $value)) {
$this->_usedProperties['allowIf'] = true;
$this->allowIf = $value['allow_if'];
unset($value['allow_if']);
}
if (array_key_exists('roles', $value)) {
$this->_usedProperties['roles'] = true;
$this->roles = $value['roles'];
unset($value['roles']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['requestMatcher'])) {
$output['request_matcher'] = $this->requestMatcher;
}
if (isset($this->_usedProperties['requiresChannel'])) {
$output['requires_channel'] = $this->requiresChannel;
}
if (isset($this->_usedProperties['path'])) {
$output['path'] = $this->path;
}
if (isset($this->_usedProperties['host'])) {
$output['host'] = $this->host;
}
if (isset($this->_usedProperties['port'])) {
$output['port'] = $this->port;
}
if (isset($this->_usedProperties['ips'])) {
$output['ips'] = $this->ips;
}
if (isset($this->_usedProperties['attributes'])) {
$output['attributes'] = $this->attributes;
}
if (isset($this->_usedProperties['route'])) {
$output['route'] = $this->route;
}
if (isset($this->_usedProperties['methods'])) {
$output['methods'] = $this->methods;
}
if (isset($this->_usedProperties['allowIf'])) {
$output['allow_if'] = $this->allowIf;
}
if (isset($this->_usedProperties['roles'])) {
$output['roles'] = $this->roles;
}
return $output;
}
}

View File

@@ -0,0 +1,144 @@
<?php
namespace Symfony\Config\Security;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class AccessDecisionManagerConfig
{
private $strategy;
private $service;
private $strategyService;
private $allowIfAllAbstain;
private $allowIfEqualGrantedDenied;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|'affirmative'|'consensus'|'unanimous'|'priority' $value
* @return $this
*/
public function strategy($value): static
{
$this->_usedProperties['strategy'] = true;
$this->strategy = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function strategyService($value): static
{
$this->_usedProperties['strategyService'] = true;
$this->strategyService = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function allowIfAllAbstain($value): static
{
$this->_usedProperties['allowIfAllAbstain'] = true;
$this->allowIfAllAbstain = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function allowIfEqualGrantedDenied($value): static
{
$this->_usedProperties['allowIfEqualGrantedDenied'] = true;
$this->allowIfEqualGrantedDenied = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('strategy', $value)) {
$this->_usedProperties['strategy'] = true;
$this->strategy = $value['strategy'];
unset($value['strategy']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('strategy_service', $value)) {
$this->_usedProperties['strategyService'] = true;
$this->strategyService = $value['strategy_service'];
unset($value['strategy_service']);
}
if (array_key_exists('allow_if_all_abstain', $value)) {
$this->_usedProperties['allowIfAllAbstain'] = true;
$this->allowIfAllAbstain = $value['allow_if_all_abstain'];
unset($value['allow_if_all_abstain']);
}
if (array_key_exists('allow_if_equal_granted_denied', $value)) {
$this->_usedProperties['allowIfEqualGrantedDenied'] = true;
$this->allowIfEqualGrantedDenied = $value['allow_if_equal_granted_denied'];
unset($value['allow_if_equal_granted_denied']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['strategy'])) {
$output['strategy'] = $this->strategy;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['strategyService'])) {
$output['strategy_service'] = $this->strategyService;
}
if (isset($this->_usedProperties['allowIfAllAbstain'])) {
$output['allow_if_all_abstain'] = $this->allowIfAllAbstain;
}
if (isset($this->_usedProperties['allowIfEqualGrantedDenied'])) {
$output['allow_if_equal_granted_denied'] = $this->allowIfEqualGrantedDenied;
}
return $output;
}
}

View File

@@ -0,0 +1,712 @@
<?php
namespace Symfony\Config\Security;
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'LogoutConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'SwitchUserConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'LoginThrottlingConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'X509Config.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'RemoteUserConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'LoginLinkConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'FormLoginConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'FormLoginLdapConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'JsonLoginConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'JsonLoginLdapConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'AccessTokenConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'HttpBasicConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'HttpBasicLdapConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'FirewallConfig'.\DIRECTORY_SEPARATOR.'RememberMeConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class FirewallConfig
{
private $pattern;
private $host;
private $methods;
private $security;
private $userChecker;
private $requestMatcher;
private $accessDeniedUrl;
private $accessDeniedHandler;
private $entryPoint;
private $provider;
private $stateless;
private $lazy;
private $context;
private $logout;
private $switchUser;
private $requiredBadges;
private $customAuthenticators;
private $loginThrottling;
private $x509;
private $remoteUser;
private $loginLink;
private $formLogin;
private $formLoginLdap;
private $jsonLogin;
private $jsonLoginLdap;
private $accessToken;
private $httpBasic;
private $httpBasicLdap;
private $rememberMe;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function pattern($value): static
{
$this->_usedProperties['pattern'] = true;
$this->pattern = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function host($value): static
{
$this->_usedProperties['host'] = true;
$this->host = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function methods(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['methods'] = true;
$this->methods = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function security($value): static
{
$this->_usedProperties['security'] = true;
$this->security = $value;
return $this;
}
/**
* The UserChecker to use when authenticating users in this firewall.
* @default 'security.user_checker'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function userChecker($value): static
{
$this->_usedProperties['userChecker'] = true;
$this->userChecker = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function requestMatcher($value): static
{
$this->_usedProperties['requestMatcher'] = true;
$this->requestMatcher = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function accessDeniedUrl($value): static
{
$this->_usedProperties['accessDeniedUrl'] = true;
$this->accessDeniedUrl = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function accessDeniedHandler($value): static
{
$this->_usedProperties['accessDeniedHandler'] = true;
$this->accessDeniedHandler = $value;
return $this;
}
/**
* An enabled authenticator name or a service id that implements "Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface".
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function entryPoint($value): static
{
$this->_usedProperties['entryPoint'] = true;
$this->entryPoint = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function stateless($value): static
{
$this->_usedProperties['stateless'] = true;
$this->stateless = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function lazy($value): static
{
$this->_usedProperties['lazy'] = true;
$this->lazy = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function context($value): static
{
$this->_usedProperties['context'] = true;
$this->context = $value;
return $this;
}
/**
* @template TValue of mixed
* @param TValue $value
* @return \Symfony\Config\Security\FirewallConfig\LogoutConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Security\FirewallConfig\LogoutConfig : static)
*/
public function logout(mixed $value = []): \Symfony\Config\Security\FirewallConfig\LogoutConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['logout'] = true;
$this->logout = $value;
return $this;
}
if (!$this->logout instanceof \Symfony\Config\Security\FirewallConfig\LogoutConfig) {
$this->_usedProperties['logout'] = true;
$this->logout = new \Symfony\Config\Security\FirewallConfig\LogoutConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "logout()" has already been initialized. You cannot pass values the second time you call logout().');
}
return $this->logout;
}
public function switchUser(array $value = []): \Symfony\Config\Security\FirewallConfig\SwitchUserConfig
{
if (null === $this->switchUser) {
$this->_usedProperties['switchUser'] = true;
$this->switchUser = new \Symfony\Config\Security\FirewallConfig\SwitchUserConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "switchUser()" has already been initialized. You cannot pass values the second time you call switchUser().');
}
return $this->switchUser;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function requiredBadges(ParamConfigurator|array $value): static
{
$this->_usedProperties['requiredBadges'] = true;
$this->requiredBadges = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function customAuthenticators(ParamConfigurator|array $value): static
{
$this->_usedProperties['customAuthenticators'] = true;
$this->customAuthenticators = $value;
return $this;
}
public function loginThrottling(array $value = []): \Symfony\Config\Security\FirewallConfig\LoginThrottlingConfig
{
if (null === $this->loginThrottling) {
$this->_usedProperties['loginThrottling'] = true;
$this->loginThrottling = new \Symfony\Config\Security\FirewallConfig\LoginThrottlingConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "loginThrottling()" has already been initialized. You cannot pass values the second time you call loginThrottling().');
}
return $this->loginThrottling;
}
public function x509(array $value = []): \Symfony\Config\Security\FirewallConfig\X509Config
{
if (null === $this->x509) {
$this->_usedProperties['x509'] = true;
$this->x509 = new \Symfony\Config\Security\FirewallConfig\X509Config($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "x509()" has already been initialized. You cannot pass values the second time you call x509().');
}
return $this->x509;
}
public function remoteUser(array $value = []): \Symfony\Config\Security\FirewallConfig\RemoteUserConfig
{
if (null === $this->remoteUser) {
$this->_usedProperties['remoteUser'] = true;
$this->remoteUser = new \Symfony\Config\Security\FirewallConfig\RemoteUserConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "remoteUser()" has already been initialized. You cannot pass values the second time you call remoteUser().');
}
return $this->remoteUser;
}
public function loginLink(array $value = []): \Symfony\Config\Security\FirewallConfig\LoginLinkConfig
{
if (null === $this->loginLink) {
$this->_usedProperties['loginLink'] = true;
$this->loginLink = new \Symfony\Config\Security\FirewallConfig\LoginLinkConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "loginLink()" has already been initialized. You cannot pass values the second time you call loginLink().');
}
return $this->loginLink;
}
public function formLogin(array $value = []): \Symfony\Config\Security\FirewallConfig\FormLoginConfig
{
if (null === $this->formLogin) {
$this->_usedProperties['formLogin'] = true;
$this->formLogin = new \Symfony\Config\Security\FirewallConfig\FormLoginConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "formLogin()" has already been initialized. You cannot pass values the second time you call formLogin().');
}
return $this->formLogin;
}
public function formLoginLdap(array $value = []): \Symfony\Config\Security\FirewallConfig\FormLoginLdapConfig
{
if (null === $this->formLoginLdap) {
$this->_usedProperties['formLoginLdap'] = true;
$this->formLoginLdap = new \Symfony\Config\Security\FirewallConfig\FormLoginLdapConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "formLoginLdap()" has already been initialized. You cannot pass values the second time you call formLoginLdap().');
}
return $this->formLoginLdap;
}
public function jsonLogin(array $value = []): \Symfony\Config\Security\FirewallConfig\JsonLoginConfig
{
if (null === $this->jsonLogin) {
$this->_usedProperties['jsonLogin'] = true;
$this->jsonLogin = new \Symfony\Config\Security\FirewallConfig\JsonLoginConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "jsonLogin()" has already been initialized. You cannot pass values the second time you call jsonLogin().');
}
return $this->jsonLogin;
}
public function jsonLoginLdap(array $value = []): \Symfony\Config\Security\FirewallConfig\JsonLoginLdapConfig
{
if (null === $this->jsonLoginLdap) {
$this->_usedProperties['jsonLoginLdap'] = true;
$this->jsonLoginLdap = new \Symfony\Config\Security\FirewallConfig\JsonLoginLdapConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "jsonLoginLdap()" has already been initialized. You cannot pass values the second time you call jsonLoginLdap().');
}
return $this->jsonLoginLdap;
}
public function accessToken(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessTokenConfig
{
if (null === $this->accessToken) {
$this->_usedProperties['accessToken'] = true;
$this->accessToken = new \Symfony\Config\Security\FirewallConfig\AccessTokenConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "accessToken()" has already been initialized. You cannot pass values the second time you call accessToken().');
}
return $this->accessToken;
}
public function httpBasic(array $value = []): \Symfony\Config\Security\FirewallConfig\HttpBasicConfig
{
if (null === $this->httpBasic) {
$this->_usedProperties['httpBasic'] = true;
$this->httpBasic = new \Symfony\Config\Security\FirewallConfig\HttpBasicConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "httpBasic()" has already been initialized. You cannot pass values the second time you call httpBasic().');
}
return $this->httpBasic;
}
public function httpBasicLdap(array $value = []): \Symfony\Config\Security\FirewallConfig\HttpBasicLdapConfig
{
if (null === $this->httpBasicLdap) {
$this->_usedProperties['httpBasicLdap'] = true;
$this->httpBasicLdap = new \Symfony\Config\Security\FirewallConfig\HttpBasicLdapConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "httpBasicLdap()" has already been initialized. You cannot pass values the second time you call httpBasicLdap().');
}
return $this->httpBasicLdap;
}
public function rememberMe(array $value = []): \Symfony\Config\Security\FirewallConfig\RememberMeConfig
{
if (null === $this->rememberMe) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = new \Symfony\Config\Security\FirewallConfig\RememberMeConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "rememberMe()" has already been initialized. You cannot pass values the second time you call rememberMe().');
}
return $this->rememberMe;
}
public function __construct(array $value = [])
{
if (array_key_exists('pattern', $value)) {
$this->_usedProperties['pattern'] = true;
$this->pattern = $value['pattern'];
unset($value['pattern']);
}
if (array_key_exists('host', $value)) {
$this->_usedProperties['host'] = true;
$this->host = $value['host'];
unset($value['host']);
}
if (array_key_exists('methods', $value)) {
$this->_usedProperties['methods'] = true;
$this->methods = $value['methods'];
unset($value['methods']);
}
if (array_key_exists('security', $value)) {
$this->_usedProperties['security'] = true;
$this->security = $value['security'];
unset($value['security']);
}
if (array_key_exists('user_checker', $value)) {
$this->_usedProperties['userChecker'] = true;
$this->userChecker = $value['user_checker'];
unset($value['user_checker']);
}
if (array_key_exists('request_matcher', $value)) {
$this->_usedProperties['requestMatcher'] = true;
$this->requestMatcher = $value['request_matcher'];
unset($value['request_matcher']);
}
if (array_key_exists('access_denied_url', $value)) {
$this->_usedProperties['accessDeniedUrl'] = true;
$this->accessDeniedUrl = $value['access_denied_url'];
unset($value['access_denied_url']);
}
if (array_key_exists('access_denied_handler', $value)) {
$this->_usedProperties['accessDeniedHandler'] = true;
$this->accessDeniedHandler = $value['access_denied_handler'];
unset($value['access_denied_handler']);
}
if (array_key_exists('entry_point', $value)) {
$this->_usedProperties['entryPoint'] = true;
$this->entryPoint = $value['entry_point'];
unset($value['entry_point']);
}
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('stateless', $value)) {
$this->_usedProperties['stateless'] = true;
$this->stateless = $value['stateless'];
unset($value['stateless']);
}
if (array_key_exists('lazy', $value)) {
$this->_usedProperties['lazy'] = true;
$this->lazy = $value['lazy'];
unset($value['lazy']);
}
if (array_key_exists('context', $value)) {
$this->_usedProperties['context'] = true;
$this->context = $value['context'];
unset($value['context']);
}
if (array_key_exists('logout', $value)) {
$this->_usedProperties['logout'] = true;
$this->logout = \is_array($value['logout']) ? new \Symfony\Config\Security\FirewallConfig\LogoutConfig($value['logout']) : $value['logout'];
unset($value['logout']);
}
if (array_key_exists('switch_user', $value)) {
$this->_usedProperties['switchUser'] = true;
$this->switchUser = new \Symfony\Config\Security\FirewallConfig\SwitchUserConfig($value['switch_user']);
unset($value['switch_user']);
}
if (array_key_exists('required_badges', $value)) {
$this->_usedProperties['requiredBadges'] = true;
$this->requiredBadges = $value['required_badges'];
unset($value['required_badges']);
}
if (array_key_exists('custom_authenticators', $value)) {
$this->_usedProperties['customAuthenticators'] = true;
$this->customAuthenticators = $value['custom_authenticators'];
unset($value['custom_authenticators']);
}
if (array_key_exists('login_throttling', $value)) {
$this->_usedProperties['loginThrottling'] = true;
$this->loginThrottling = new \Symfony\Config\Security\FirewallConfig\LoginThrottlingConfig($value['login_throttling']);
unset($value['login_throttling']);
}
if (array_key_exists('x509', $value)) {
$this->_usedProperties['x509'] = true;
$this->x509 = new \Symfony\Config\Security\FirewallConfig\X509Config($value['x509']);
unset($value['x509']);
}
if (array_key_exists('remote_user', $value)) {
$this->_usedProperties['remoteUser'] = true;
$this->remoteUser = new \Symfony\Config\Security\FirewallConfig\RemoteUserConfig($value['remote_user']);
unset($value['remote_user']);
}
if (array_key_exists('login_link', $value)) {
$this->_usedProperties['loginLink'] = true;
$this->loginLink = new \Symfony\Config\Security\FirewallConfig\LoginLinkConfig($value['login_link']);
unset($value['login_link']);
}
if (array_key_exists('form_login', $value)) {
$this->_usedProperties['formLogin'] = true;
$this->formLogin = new \Symfony\Config\Security\FirewallConfig\FormLoginConfig($value['form_login']);
unset($value['form_login']);
}
if (array_key_exists('form_login_ldap', $value)) {
$this->_usedProperties['formLoginLdap'] = true;
$this->formLoginLdap = new \Symfony\Config\Security\FirewallConfig\FormLoginLdapConfig($value['form_login_ldap']);
unset($value['form_login_ldap']);
}
if (array_key_exists('json_login', $value)) {
$this->_usedProperties['jsonLogin'] = true;
$this->jsonLogin = new \Symfony\Config\Security\FirewallConfig\JsonLoginConfig($value['json_login']);
unset($value['json_login']);
}
if (array_key_exists('json_login_ldap', $value)) {
$this->_usedProperties['jsonLoginLdap'] = true;
$this->jsonLoginLdap = new \Symfony\Config\Security\FirewallConfig\JsonLoginLdapConfig($value['json_login_ldap']);
unset($value['json_login_ldap']);
}
if (array_key_exists('access_token', $value)) {
$this->_usedProperties['accessToken'] = true;
$this->accessToken = new \Symfony\Config\Security\FirewallConfig\AccessTokenConfig($value['access_token']);
unset($value['access_token']);
}
if (array_key_exists('http_basic', $value)) {
$this->_usedProperties['httpBasic'] = true;
$this->httpBasic = new \Symfony\Config\Security\FirewallConfig\HttpBasicConfig($value['http_basic']);
unset($value['http_basic']);
}
if (array_key_exists('http_basic_ldap', $value)) {
$this->_usedProperties['httpBasicLdap'] = true;
$this->httpBasicLdap = new \Symfony\Config\Security\FirewallConfig\HttpBasicLdapConfig($value['http_basic_ldap']);
unset($value['http_basic_ldap']);
}
if (array_key_exists('remember_me', $value)) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = new \Symfony\Config\Security\FirewallConfig\RememberMeConfig($value['remember_me']);
unset($value['remember_me']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['pattern'])) {
$output['pattern'] = $this->pattern;
}
if (isset($this->_usedProperties['host'])) {
$output['host'] = $this->host;
}
if (isset($this->_usedProperties['methods'])) {
$output['methods'] = $this->methods;
}
if (isset($this->_usedProperties['security'])) {
$output['security'] = $this->security;
}
if (isset($this->_usedProperties['userChecker'])) {
$output['user_checker'] = $this->userChecker;
}
if (isset($this->_usedProperties['requestMatcher'])) {
$output['request_matcher'] = $this->requestMatcher;
}
if (isset($this->_usedProperties['accessDeniedUrl'])) {
$output['access_denied_url'] = $this->accessDeniedUrl;
}
if (isset($this->_usedProperties['accessDeniedHandler'])) {
$output['access_denied_handler'] = $this->accessDeniedHandler;
}
if (isset($this->_usedProperties['entryPoint'])) {
$output['entry_point'] = $this->entryPoint;
}
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['stateless'])) {
$output['stateless'] = $this->stateless;
}
if (isset($this->_usedProperties['lazy'])) {
$output['lazy'] = $this->lazy;
}
if (isset($this->_usedProperties['context'])) {
$output['context'] = $this->context;
}
if (isset($this->_usedProperties['logout'])) {
$output['logout'] = $this->logout instanceof \Symfony\Config\Security\FirewallConfig\LogoutConfig ? $this->logout->toArray() : $this->logout;
}
if (isset($this->_usedProperties['switchUser'])) {
$output['switch_user'] = $this->switchUser->toArray();
}
if (isset($this->_usedProperties['requiredBadges'])) {
$output['required_badges'] = $this->requiredBadges;
}
if (isset($this->_usedProperties['customAuthenticators'])) {
$output['custom_authenticators'] = $this->customAuthenticators;
}
if (isset($this->_usedProperties['loginThrottling'])) {
$output['login_throttling'] = $this->loginThrottling->toArray();
}
if (isset($this->_usedProperties['x509'])) {
$output['x509'] = $this->x509->toArray();
}
if (isset($this->_usedProperties['remoteUser'])) {
$output['remote_user'] = $this->remoteUser->toArray();
}
if (isset($this->_usedProperties['loginLink'])) {
$output['login_link'] = $this->loginLink->toArray();
}
if (isset($this->_usedProperties['formLogin'])) {
$output['form_login'] = $this->formLogin->toArray();
}
if (isset($this->_usedProperties['formLoginLdap'])) {
$output['form_login_ldap'] = $this->formLoginLdap->toArray();
}
if (isset($this->_usedProperties['jsonLogin'])) {
$output['json_login'] = $this->jsonLogin->toArray();
}
if (isset($this->_usedProperties['jsonLoginLdap'])) {
$output['json_login_ldap'] = $this->jsonLoginLdap->toArray();
}
if (isset($this->_usedProperties['accessToken'])) {
$output['access_token'] = $this->accessToken->toArray();
}
if (isset($this->_usedProperties['httpBasic'])) {
$output['http_basic'] = $this->httpBasic->toArray();
}
if (isset($this->_usedProperties['httpBasicLdap'])) {
$output['http_basic_ldap'] = $this->httpBasicLdap->toArray();
}
if (isset($this->_usedProperties['rememberMe'])) {
$output['remember_me'] = $this->rememberMe->toArray();
}
return $output;
}
}

View File

@@ -0,0 +1,101 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class CasConfig
{
private $validationUrl;
private $prefix;
private $httpClient;
private $_usedProperties = [];
/**
* CAS server validation URL
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function validationUrl($value): static
{
$this->_usedProperties['validationUrl'] = true;
$this->validationUrl = $value;
return $this;
}
/**
* CAS prefix
* @default 'cas'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function prefix($value): static
{
$this->_usedProperties['prefix'] = true;
$this->prefix = $value;
return $this;
}
/**
* HTTP Client service
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function httpClient($value): static
{
$this->_usedProperties['httpClient'] = true;
$this->httpClient = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('validation_url', $value)) {
$this->_usedProperties['validationUrl'] = true;
$this->validationUrl = $value['validation_url'];
unset($value['validation_url']);
}
if (array_key_exists('prefix', $value)) {
$this->_usedProperties['prefix'] = true;
$this->prefix = $value['prefix'];
unset($value['prefix']);
}
if (array_key_exists('http_client', $value)) {
$this->_usedProperties['httpClient'] = true;
$this->httpClient = $value['http_client'];
unset($value['http_client']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['validationUrl'])) {
$output['validation_url'] = $this->validationUrl;
}
if (isset($this->_usedProperties['prefix'])) {
$output['prefix'] = $this->prefix;
}
if (isset($this->_usedProperties['httpClient'])) {
$output['http_client'] = $this->httpClient;
}
return $output;
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class AlgorithmConfig
{
public function __construct(array $value = [])
{
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
return $output;
}
}

View File

@@ -0,0 +1,53 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\Discovery;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class CacheConfig
{
private $id;
private $_usedProperties = [];
/**
* Cache service id to use to cache the OIDC discovery configuration.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
return $output;
}
}

View File

@@ -0,0 +1,77 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Discovery'.\DIRECTORY_SEPARATOR.'CacheConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class DiscoveryConfig
{
private $baseUri;
private $cache;
private $_usedProperties = [];
/**
* Base URI of the OIDC server.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function baseUri($value): static
{
$this->_usedProperties['baseUri'] = true;
$this->baseUri = $value;
return $this;
}
public function cache(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\Discovery\CacheConfig
{
if (null === $this->cache) {
$this->_usedProperties['cache'] = true;
$this->cache = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\Discovery\CacheConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "cache()" has already been initialized. You cannot pass values the second time you call cache().');
}
return $this->cache;
}
public function __construct(array $value = [])
{
if (array_key_exists('base_uri', $value)) {
$this->_usedProperties['baseUri'] = true;
$this->baseUri = $value['base_uri'];
unset($value['base_uri']);
}
if (array_key_exists('cache', $value)) {
$this->_usedProperties['cache'] = true;
$this->cache = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\Discovery\CacheConfig($value['cache']);
unset($value['cache']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['baseUri'])) {
$output['base_uri'] = $this->baseUri;
}
if (isset($this->_usedProperties['cache'])) {
$output['cache'] = $this->cache->toArray();
}
return $output;
}
}

View File

@@ -0,0 +1,123 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class EncryptionConfig
{
private $enabled;
private $enforce;
private $algorithms;
private $keyset;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* When enabled, the token shall be encrypted.
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enforce($value): static
{
$this->_usedProperties['enforce'] = true;
$this->enforce = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function algorithms(ParamConfigurator|array $value): static
{
$this->_usedProperties['algorithms'] = true;
$this->algorithms = $value;
return $this;
}
/**
* JSON-encoded JWKSet used to decrypt the token (must contain a list of valid private keys).
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function keyset($value): static
{
$this->_usedProperties['keyset'] = true;
$this->keyset = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('enforce', $value)) {
$this->_usedProperties['enforce'] = true;
$this->enforce = $value['enforce'];
unset($value['enforce']);
}
if (array_key_exists('algorithms', $value)) {
$this->_usedProperties['algorithms'] = true;
$this->algorithms = $value['algorithms'];
unset($value['algorithms']);
}
if (array_key_exists('keyset', $value)) {
$this->_usedProperties['keyset'] = true;
$this->keyset = $value['keyset'];
unset($value['keyset']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['enforce'])) {
$output['enforce'] = $this->enforce;
}
if (isset($this->_usedProperties['algorithms'])) {
$output['algorithms'] = $this->algorithms;
}
if (isset($this->_usedProperties['keyset'])) {
$output['keyset'] = $this->keyset;
}
return $output;
}
}

View File

@@ -0,0 +1,252 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Oidc'.\DIRECTORY_SEPARATOR.'DiscoveryConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'Oidc'.\DIRECTORY_SEPARATOR.'AlgorithmConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'Oidc'.\DIRECTORY_SEPARATOR.'EncryptionConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\Config\Loader\ParamConfigurator;
/**
* This class is automatically generated to help in creating a config.
*/
class OidcConfig
{
private $discovery;
private $claim;
private $audience;
private $issuers;
private $algorithm;
private $algorithms;
private $key;
private $keyset;
private $encryption;
private $_usedProperties = [];
/**
* Enable the OIDC discovery.
*/
public function discovery(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\DiscoveryConfig
{
if (null === $this->discovery) {
$this->_usedProperties['discovery'] = true;
$this->discovery = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\DiscoveryConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "discovery()" has already been initialized. You cannot pass values the second time you call discovery().');
}
return $this->discovery;
}
/**
* Claim which contains the user identifier (e.g.: sub, email..).
* @default 'sub'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function claim($value): static
{
$this->_usedProperties['claim'] = true;
$this->claim = $value;
return $this;
}
/**
* Audience set in the token, for validation purpose.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function audience($value): static
{
$this->_usedProperties['audience'] = true;
$this->audience = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function issuers(ParamConfigurator|array $value): static
{
$this->_usedProperties['issuers'] = true;
$this->issuers = $value;
return $this;
}
/**
* Algorithm used to sign the token.
* @deprecated The "algorithm" option is deprecated and will be removed in 8.0. Use the "algorithms" option instead.
*/
public function algorithm(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\AlgorithmConfig
{
if (null === $this->algorithm) {
$this->_usedProperties['algorithm'] = true;
$this->algorithm = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\AlgorithmConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "algorithm()" has already been initialized. You cannot pass values the second time you call algorithm().');
}
return $this->algorithm;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function algorithms(ParamConfigurator|array $value): static
{
$this->_usedProperties['algorithms'] = true;
$this->algorithms = $value;
return $this;
}
/**
* JSON-encoded JWK used to sign the token (must contain a "kty" key).
* @default null
* @param ParamConfigurator|mixed $value
* @deprecated The "key" option is deprecated and will be removed in 8.0. Use the "keyset" option instead.
* @return $this
*/
public function key($value): static
{
$this->_usedProperties['key'] = true;
$this->key = $value;
return $this;
}
/**
* JSON-encoded JWKSet used to sign the token (must contain a list of valid public keys).
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function keyset($value): static
{
$this->_usedProperties['keyset'] = true;
$this->keyset = $value;
return $this;
}
/**
* @default {"enabled":false,"enforce":false,"algorithms":[]}
*/
public function encryption(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\EncryptionConfig
{
if (null === $this->encryption) {
$this->_usedProperties['encryption'] = true;
$this->encryption = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\EncryptionConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "encryption()" has already been initialized. You cannot pass values the second time you call encryption().');
}
return $this->encryption;
}
public function __construct(array $value = [])
{
if (array_key_exists('discovery', $value)) {
$this->_usedProperties['discovery'] = true;
$this->discovery = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\DiscoveryConfig($value['discovery']);
unset($value['discovery']);
}
if (array_key_exists('claim', $value)) {
$this->_usedProperties['claim'] = true;
$this->claim = $value['claim'];
unset($value['claim']);
}
if (array_key_exists('audience', $value)) {
$this->_usedProperties['audience'] = true;
$this->audience = $value['audience'];
unset($value['audience']);
}
if (array_key_exists('issuers', $value)) {
$this->_usedProperties['issuers'] = true;
$this->issuers = $value['issuers'];
unset($value['issuers']);
}
if (array_key_exists('algorithm', $value)) {
$this->_usedProperties['algorithm'] = true;
$this->algorithm = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\AlgorithmConfig($value['algorithm']);
unset($value['algorithm']);
}
if (array_key_exists('algorithms', $value)) {
$this->_usedProperties['algorithms'] = true;
$this->algorithms = $value['algorithms'];
unset($value['algorithms']);
}
if (array_key_exists('key', $value)) {
$this->_usedProperties['key'] = true;
$this->key = $value['key'];
unset($value['key']);
}
if (array_key_exists('keyset', $value)) {
$this->_usedProperties['keyset'] = true;
$this->keyset = $value['keyset'];
unset($value['keyset']);
}
if (array_key_exists('encryption', $value)) {
$this->_usedProperties['encryption'] = true;
$this->encryption = \is_array($value['encryption']) ? new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\EncryptionConfig($value['encryption']) : $value['encryption'];
unset($value['encryption']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['discovery'])) {
$output['discovery'] = $this->discovery->toArray();
}
if (isset($this->_usedProperties['claim'])) {
$output['claim'] = $this->claim;
}
if (isset($this->_usedProperties['audience'])) {
$output['audience'] = $this->audience;
}
if (isset($this->_usedProperties['issuers'])) {
$output['issuers'] = $this->issuers;
}
if (isset($this->_usedProperties['algorithm'])) {
$output['algorithm'] = $this->algorithm->toArray();
}
if (isset($this->_usedProperties['algorithms'])) {
$output['algorithms'] = $this->algorithms;
}
if (isset($this->_usedProperties['key'])) {
$output['key'] = $this->key;
}
if (isset($this->_usedProperties['keyset'])) {
$output['keyset'] = $this->keyset;
}
if (isset($this->_usedProperties['encryption'])) {
$output['encryption'] = $this->encryption instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\Oidc\EncryptionConfig ? $this->encryption->toArray() : $this->encryption;
}
return $output;
}
}

View File

@@ -0,0 +1,53 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\Discovery;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class CacheConfig
{
private $id;
private $_usedProperties = [];
/**
* Cache service id to use to cache the OIDC discovery configuration.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
return $output;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Discovery'.\DIRECTORY_SEPARATOR.'CacheConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class DiscoveryConfig
{
private $cache;
private $_usedProperties = [];
public function cache(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\Discovery\CacheConfig
{
if (null === $this->cache) {
$this->_usedProperties['cache'] = true;
$this->cache = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\Discovery\CacheConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "cache()" has already been initialized. You cannot pass values the second time you call cache().');
}
return $this->cache;
}
public function __construct(array $value = [])
{
if (array_key_exists('cache', $value)) {
$this->_usedProperties['cache'] = true;
$this->cache = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\Discovery\CacheConfig($value['cache']);
unset($value['cache']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['cache'])) {
$output['cache'] = $this->cache->toArray();
}
return $output;
}
}

View File

@@ -0,0 +1,128 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler;
require_once __DIR__.\DIRECTORY_SEPARATOR.'OidcUserInfo'.\DIRECTORY_SEPARATOR.'DiscoveryConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class OidcUserInfoConfig
{
private $baseUri;
private $discovery;
private $claim;
private $client;
private $_usedProperties = [];
/**
* Base URI of the userinfo endpoint on the OIDC server, or the OIDC server URI to use the discovery (require "discovery" to be configured).
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function baseUri($value): static
{
$this->_usedProperties['baseUri'] = true;
$this->baseUri = $value;
return $this;
}
/**
* Enable the OIDC discovery.
*/
public function discovery(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\DiscoveryConfig
{
if (null === $this->discovery) {
$this->_usedProperties['discovery'] = true;
$this->discovery = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\DiscoveryConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "discovery()" has already been initialized. You cannot pass values the second time you call discovery().');
}
return $this->discovery;
}
/**
* Claim which contains the user identifier (e.g. sub, email, etc.).
* @default 'sub'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function claim($value): static
{
$this->_usedProperties['claim'] = true;
$this->claim = $value;
return $this;
}
/**
* HttpClient service id to use to call the OIDC server.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function client($value): static
{
$this->_usedProperties['client'] = true;
$this->client = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('base_uri', $value)) {
$this->_usedProperties['baseUri'] = true;
$this->baseUri = $value['base_uri'];
unset($value['base_uri']);
}
if (array_key_exists('discovery', $value)) {
$this->_usedProperties['discovery'] = true;
$this->discovery = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfo\DiscoveryConfig($value['discovery']);
unset($value['discovery']);
}
if (array_key_exists('claim', $value)) {
$this->_usedProperties['claim'] = true;
$this->claim = $value['claim'];
unset($value['claim']);
}
if (array_key_exists('client', $value)) {
$this->_usedProperties['client'] = true;
$this->client = $value['client'];
unset($value['client']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['baseUri'])) {
$output['base_uri'] = $this->baseUri;
}
if (isset($this->_usedProperties['discovery'])) {
$output['discovery'] = $this->discovery->toArray();
}
if (isset($this->_usedProperties['claim'])) {
$output['claim'] = $this->claim;
}
if (isset($this->_usedProperties['client'])) {
$output['client'] = $this->client;
}
return $output;
}
}

View File

@@ -0,0 +1,171 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\AccessToken;
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenHandler'.\DIRECTORY_SEPARATOR.'OidcUserInfoConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenHandler'.\DIRECTORY_SEPARATOR.'OidcConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenHandler'.\DIRECTORY_SEPARATOR.'CasConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class TokenHandlerConfig
{
private $id;
private $oidcUserInfo;
private $oidc;
private $cas;
private $oauth2;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @template TValue of string|array
* @param TValue $value
* @return \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig : static)
*/
public function oidcUserInfo(string|array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['oidcUserInfo'] = true;
$this->oidcUserInfo = $value;
return $this;
}
if (!$this->oidcUserInfo instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig) {
$this->_usedProperties['oidcUserInfo'] = true;
$this->oidcUserInfo = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "oidcUserInfo()" has already been initialized. You cannot pass values the second time you call oidcUserInfo().');
}
return $this->oidcUserInfo;
}
/**
* @template TValue of mixed
* @param TValue $value
* @return \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig : static)
*/
public function oidc(mixed $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['oidc'] = true;
$this->oidc = $value;
return $this;
}
if (!$this->oidc instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig) {
$this->_usedProperties['oidc'] = true;
$this->oidc = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "oidc()" has already been initialized. You cannot pass values the second time you call oidc().');
}
return $this->oidc;
}
public function cas(array $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\CasConfig
{
if (null === $this->cas) {
$this->_usedProperties['cas'] = true;
$this->cas = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\CasConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "cas()" has already been initialized. You cannot pass values the second time you call cas().');
}
return $this->cas;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function oauth2($value): static
{
$this->_usedProperties['oauth2'] = true;
$this->oauth2 = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('oidc_user_info', $value)) {
$this->_usedProperties['oidcUserInfo'] = true;
$this->oidcUserInfo = \is_array($value['oidc_user_info']) ? new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig($value['oidc_user_info']) : $value['oidc_user_info'];
unset($value['oidc_user_info']);
}
if (array_key_exists('oidc', $value)) {
$this->_usedProperties['oidc'] = true;
$this->oidc = \is_array($value['oidc']) ? new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig($value['oidc']) : $value['oidc'];
unset($value['oidc']);
}
if (array_key_exists('cas', $value)) {
$this->_usedProperties['cas'] = true;
$this->cas = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\CasConfig($value['cas']);
unset($value['cas']);
}
if (array_key_exists('oauth2', $value)) {
$this->_usedProperties['oauth2'] = true;
$this->oauth2 = $value['oauth2'];
unset($value['oauth2']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['oidcUserInfo'])) {
$output['oidc_user_info'] = $this->oidcUserInfo instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcUserInfoConfig ? $this->oidcUserInfo->toArray() : $this->oidcUserInfo;
}
if (isset($this->_usedProperties['oidc'])) {
$output['oidc'] = $this->oidc instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandler\OidcConfig ? $this->oidc->toArray() : $this->oidc;
}
if (isset($this->_usedProperties['cas'])) {
$output['cas'] = $this->cas->toArray();
}
if (isset($this->_usedProperties['oauth2'])) {
$output['oauth2'] = $this->oauth2;
}
return $output;
}
}

View File

@@ -0,0 +1,205 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'AccessToken'.\DIRECTORY_SEPARATOR.'TokenHandlerConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class AccessTokenConfig
{
private $provider;
private $rememberMe;
private $successHandler;
private $failureHandler;
private $realm;
private $tokenExtractors;
private $tokenHandler;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function rememberMe($value): static
{
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function successHandler($value): static
{
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureHandler($value): static
{
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function realm($value): static
{
$this->_usedProperties['realm'] = true;
$this->realm = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function tokenExtractors(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['tokenExtractors'] = true;
$this->tokenExtractors = $value;
return $this;
}
/**
* @template TValue of mixed
* @param TValue $value
* @example "App\\Security\\CustomTokenHandler"
* @return \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig : static)
*/
public function tokenHandler(mixed $value = []): \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['tokenHandler'] = true;
$this->tokenHandler = $value;
return $this;
}
if (!$this->tokenHandler instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig) {
$this->_usedProperties['tokenHandler'] = true;
$this->tokenHandler = new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "tokenHandler()" has already been initialized. You cannot pass values the second time you call tokenHandler().');
}
return $this->tokenHandler;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('remember_me', $value)) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value['remember_me'];
unset($value['remember_me']);
}
if (array_key_exists('success_handler', $value)) {
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value['success_handler'];
unset($value['success_handler']);
}
if (array_key_exists('failure_handler', $value)) {
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value['failure_handler'];
unset($value['failure_handler']);
}
if (array_key_exists('realm', $value)) {
$this->_usedProperties['realm'] = true;
$this->realm = $value['realm'];
unset($value['realm']);
}
if (array_key_exists('token_extractors', $value)) {
$this->_usedProperties['tokenExtractors'] = true;
$this->tokenExtractors = $value['token_extractors'];
unset($value['token_extractors']);
}
if (array_key_exists('token_handler', $value)) {
$this->_usedProperties['tokenHandler'] = true;
$this->tokenHandler = \is_array($value['token_handler']) ? new \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig($value['token_handler']) : $value['token_handler'];
unset($value['token_handler']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['rememberMe'])) {
$output['remember_me'] = $this->rememberMe;
}
if (isset($this->_usedProperties['successHandler'])) {
$output['success_handler'] = $this->successHandler;
}
if (isset($this->_usedProperties['failureHandler'])) {
$output['failure_handler'] = $this->failureHandler;
}
if (isset($this->_usedProperties['realm'])) {
$output['realm'] = $this->realm;
}
if (isset($this->_usedProperties['tokenExtractors'])) {
$output['token_extractors'] = $this->tokenExtractors;
}
if (isset($this->_usedProperties['tokenHandler'])) {
$output['token_handler'] = $this->tokenHandler instanceof \Symfony\Config\Security\FirewallConfig\AccessToken\TokenHandlerConfig ? $this->tokenHandler->toArray() : $this->tokenHandler;
}
return $output;
}
}

View File

@@ -0,0 +1,512 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class FormLoginConfig
{
private $provider;
private $rememberMe;
private $successHandler;
private $failureHandler;
private $checkPath;
private $useForward;
private $loginPath;
private $usernameParameter;
private $passwordParameter;
private $csrfParameter;
private $csrfTokenId;
private $enableCsrf;
private $postOnly;
private $formOnly;
private $alwaysUseDefaultTargetPath;
private $defaultTargetPath;
private $targetPathParameter;
private $useReferer;
private $failurePath;
private $failureForward;
private $failurePathParameter;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function rememberMe($value): static
{
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function successHandler($value): static
{
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureHandler($value): static
{
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value;
return $this;
}
/**
* @default '/login_check'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkPath($value): static
{
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useForward($value): static
{
$this->_usedProperties['useForward'] = true;
$this->useForward = $value;
return $this;
}
/**
* @default '/login'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function loginPath($value): static
{
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value;
return $this;
}
/**
* @default '_username'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function usernameParameter($value): static
{
$this->_usedProperties['usernameParameter'] = true;
$this->usernameParameter = $value;
return $this;
}
/**
* @default '_password'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function passwordParameter($value): static
{
$this->_usedProperties['passwordParameter'] = true;
$this->passwordParameter = $value;
return $this;
}
/**
* @default '_csrf_token'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfParameter($value): static
{
$this->_usedProperties['csrfParameter'] = true;
$this->csrfParameter = $value;
return $this;
}
/**
* @default 'authenticate'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfTokenId($value): static
{
$this->_usedProperties['csrfTokenId'] = true;
$this->csrfTokenId = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enableCsrf($value): static
{
$this->_usedProperties['enableCsrf'] = true;
$this->enableCsrf = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function postOnly($value): static
{
$this->_usedProperties['postOnly'] = true;
$this->postOnly = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function formOnly($value): static
{
$this->_usedProperties['formOnly'] = true;
$this->formOnly = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function alwaysUseDefaultTargetPath($value): static
{
$this->_usedProperties['alwaysUseDefaultTargetPath'] = true;
$this->alwaysUseDefaultTargetPath = $value;
return $this;
}
/**
* @default '/'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function defaultTargetPath($value): static
{
$this->_usedProperties['defaultTargetPath'] = true;
$this->defaultTargetPath = $value;
return $this;
}
/**
* @default '_target_path'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function targetPathParameter($value): static
{
$this->_usedProperties['targetPathParameter'] = true;
$this->targetPathParameter = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useReferer($value): static
{
$this->_usedProperties['useReferer'] = true;
$this->useReferer = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failurePath($value): static
{
$this->_usedProperties['failurePath'] = true;
$this->failurePath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function failureForward($value): static
{
$this->_usedProperties['failureForward'] = true;
$this->failureForward = $value;
return $this;
}
/**
* @default '_failure_path'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failurePathParameter($value): static
{
$this->_usedProperties['failurePathParameter'] = true;
$this->failurePathParameter = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('remember_me', $value)) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value['remember_me'];
unset($value['remember_me']);
}
if (array_key_exists('success_handler', $value)) {
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value['success_handler'];
unset($value['success_handler']);
}
if (array_key_exists('failure_handler', $value)) {
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value['failure_handler'];
unset($value['failure_handler']);
}
if (array_key_exists('check_path', $value)) {
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value['check_path'];
unset($value['check_path']);
}
if (array_key_exists('use_forward', $value)) {
$this->_usedProperties['useForward'] = true;
$this->useForward = $value['use_forward'];
unset($value['use_forward']);
}
if (array_key_exists('login_path', $value)) {
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value['login_path'];
unset($value['login_path']);
}
if (array_key_exists('username_parameter', $value)) {
$this->_usedProperties['usernameParameter'] = true;
$this->usernameParameter = $value['username_parameter'];
unset($value['username_parameter']);
}
if (array_key_exists('password_parameter', $value)) {
$this->_usedProperties['passwordParameter'] = true;
$this->passwordParameter = $value['password_parameter'];
unset($value['password_parameter']);
}
if (array_key_exists('csrf_parameter', $value)) {
$this->_usedProperties['csrfParameter'] = true;
$this->csrfParameter = $value['csrf_parameter'];
unset($value['csrf_parameter']);
}
if (array_key_exists('csrf_token_id', $value)) {
$this->_usedProperties['csrfTokenId'] = true;
$this->csrfTokenId = $value['csrf_token_id'];
unset($value['csrf_token_id']);
}
if (array_key_exists('enable_csrf', $value)) {
$this->_usedProperties['enableCsrf'] = true;
$this->enableCsrf = $value['enable_csrf'];
unset($value['enable_csrf']);
}
if (array_key_exists('post_only', $value)) {
$this->_usedProperties['postOnly'] = true;
$this->postOnly = $value['post_only'];
unset($value['post_only']);
}
if (array_key_exists('form_only', $value)) {
$this->_usedProperties['formOnly'] = true;
$this->formOnly = $value['form_only'];
unset($value['form_only']);
}
if (array_key_exists('always_use_default_target_path', $value)) {
$this->_usedProperties['alwaysUseDefaultTargetPath'] = true;
$this->alwaysUseDefaultTargetPath = $value['always_use_default_target_path'];
unset($value['always_use_default_target_path']);
}
if (array_key_exists('default_target_path', $value)) {
$this->_usedProperties['defaultTargetPath'] = true;
$this->defaultTargetPath = $value['default_target_path'];
unset($value['default_target_path']);
}
if (array_key_exists('target_path_parameter', $value)) {
$this->_usedProperties['targetPathParameter'] = true;
$this->targetPathParameter = $value['target_path_parameter'];
unset($value['target_path_parameter']);
}
if (array_key_exists('use_referer', $value)) {
$this->_usedProperties['useReferer'] = true;
$this->useReferer = $value['use_referer'];
unset($value['use_referer']);
}
if (array_key_exists('failure_path', $value)) {
$this->_usedProperties['failurePath'] = true;
$this->failurePath = $value['failure_path'];
unset($value['failure_path']);
}
if (array_key_exists('failure_forward', $value)) {
$this->_usedProperties['failureForward'] = true;
$this->failureForward = $value['failure_forward'];
unset($value['failure_forward']);
}
if (array_key_exists('failure_path_parameter', $value)) {
$this->_usedProperties['failurePathParameter'] = true;
$this->failurePathParameter = $value['failure_path_parameter'];
unset($value['failure_path_parameter']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['rememberMe'])) {
$output['remember_me'] = $this->rememberMe;
}
if (isset($this->_usedProperties['successHandler'])) {
$output['success_handler'] = $this->successHandler;
}
if (isset($this->_usedProperties['failureHandler'])) {
$output['failure_handler'] = $this->failureHandler;
}
if (isset($this->_usedProperties['checkPath'])) {
$output['check_path'] = $this->checkPath;
}
if (isset($this->_usedProperties['useForward'])) {
$output['use_forward'] = $this->useForward;
}
if (isset($this->_usedProperties['loginPath'])) {
$output['login_path'] = $this->loginPath;
}
if (isset($this->_usedProperties['usernameParameter'])) {
$output['username_parameter'] = $this->usernameParameter;
}
if (isset($this->_usedProperties['passwordParameter'])) {
$output['password_parameter'] = $this->passwordParameter;
}
if (isset($this->_usedProperties['csrfParameter'])) {
$output['csrf_parameter'] = $this->csrfParameter;
}
if (isset($this->_usedProperties['csrfTokenId'])) {
$output['csrf_token_id'] = $this->csrfTokenId;
}
if (isset($this->_usedProperties['enableCsrf'])) {
$output['enable_csrf'] = $this->enableCsrf;
}
if (isset($this->_usedProperties['postOnly'])) {
$output['post_only'] = $this->postOnly;
}
if (isset($this->_usedProperties['formOnly'])) {
$output['form_only'] = $this->formOnly;
}
if (isset($this->_usedProperties['alwaysUseDefaultTargetPath'])) {
$output['always_use_default_target_path'] = $this->alwaysUseDefaultTargetPath;
}
if (isset($this->_usedProperties['defaultTargetPath'])) {
$output['default_target_path'] = $this->defaultTargetPath;
}
if (isset($this->_usedProperties['targetPathParameter'])) {
$output['target_path_parameter'] = $this->targetPathParameter;
}
if (isset($this->_usedProperties['useReferer'])) {
$output['use_referer'] = $this->useReferer;
}
if (isset($this->_usedProperties['failurePath'])) {
$output['failure_path'] = $this->failurePath;
}
if (isset($this->_usedProperties['failureForward'])) {
$output['failure_forward'] = $this->failureForward;
}
if (isset($this->_usedProperties['failurePathParameter'])) {
$output['failure_path_parameter'] = $this->failurePathParameter;
}
return $output;
}
}

View File

@@ -0,0 +1,625 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class FormLoginLdapConfig
{
private $provider;
private $rememberMe;
private $successHandler;
private $failureHandler;
private $checkPath;
private $useForward;
private $loginPath;
private $usernameParameter;
private $passwordParameter;
private $csrfParameter;
private $csrfTokenId;
private $enableCsrf;
private $postOnly;
private $formOnly;
private $alwaysUseDefaultTargetPath;
private $defaultTargetPath;
private $targetPathParameter;
private $useReferer;
private $failurePath;
private $failureForward;
private $failurePathParameter;
private $service;
private $dnString;
private $queryString;
private $searchDn;
private $searchPassword;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function rememberMe($value): static
{
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function successHandler($value): static
{
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureHandler($value): static
{
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value;
return $this;
}
/**
* @default '/login_check'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkPath($value): static
{
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useForward($value): static
{
$this->_usedProperties['useForward'] = true;
$this->useForward = $value;
return $this;
}
/**
* @default '/login'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function loginPath($value): static
{
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value;
return $this;
}
/**
* @default '_username'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function usernameParameter($value): static
{
$this->_usedProperties['usernameParameter'] = true;
$this->usernameParameter = $value;
return $this;
}
/**
* @default '_password'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function passwordParameter($value): static
{
$this->_usedProperties['passwordParameter'] = true;
$this->passwordParameter = $value;
return $this;
}
/**
* @default '_csrf_token'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfParameter($value): static
{
$this->_usedProperties['csrfParameter'] = true;
$this->csrfParameter = $value;
return $this;
}
/**
* @default 'authenticate'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfTokenId($value): static
{
$this->_usedProperties['csrfTokenId'] = true;
$this->csrfTokenId = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enableCsrf($value): static
{
$this->_usedProperties['enableCsrf'] = true;
$this->enableCsrf = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function postOnly($value): static
{
$this->_usedProperties['postOnly'] = true;
$this->postOnly = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function formOnly($value): static
{
$this->_usedProperties['formOnly'] = true;
$this->formOnly = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function alwaysUseDefaultTargetPath($value): static
{
$this->_usedProperties['alwaysUseDefaultTargetPath'] = true;
$this->alwaysUseDefaultTargetPath = $value;
return $this;
}
/**
* @default '/'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function defaultTargetPath($value): static
{
$this->_usedProperties['defaultTargetPath'] = true;
$this->defaultTargetPath = $value;
return $this;
}
/**
* @default '_target_path'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function targetPathParameter($value): static
{
$this->_usedProperties['targetPathParameter'] = true;
$this->targetPathParameter = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useReferer($value): static
{
$this->_usedProperties['useReferer'] = true;
$this->useReferer = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failurePath($value): static
{
$this->_usedProperties['failurePath'] = true;
$this->failurePath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function failureForward($value): static
{
$this->_usedProperties['failureForward'] = true;
$this->failureForward = $value;
return $this;
}
/**
* @default '_failure_path'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failurePathParameter($value): static
{
$this->_usedProperties['failurePathParameter'] = true;
$this->failurePathParameter = $value;
return $this;
}
/**
* @default 'ldap'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default '{user_identifier}'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function dnString($value): static
{
$this->_usedProperties['dnString'] = true;
$this->dnString = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function queryString($value): static
{
$this->_usedProperties['queryString'] = true;
$this->queryString = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchDn($value): static
{
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchPassword($value): static
{
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('remember_me', $value)) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value['remember_me'];
unset($value['remember_me']);
}
if (array_key_exists('success_handler', $value)) {
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value['success_handler'];
unset($value['success_handler']);
}
if (array_key_exists('failure_handler', $value)) {
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value['failure_handler'];
unset($value['failure_handler']);
}
if (array_key_exists('check_path', $value)) {
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value['check_path'];
unset($value['check_path']);
}
if (array_key_exists('use_forward', $value)) {
$this->_usedProperties['useForward'] = true;
$this->useForward = $value['use_forward'];
unset($value['use_forward']);
}
if (array_key_exists('login_path', $value)) {
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value['login_path'];
unset($value['login_path']);
}
if (array_key_exists('username_parameter', $value)) {
$this->_usedProperties['usernameParameter'] = true;
$this->usernameParameter = $value['username_parameter'];
unset($value['username_parameter']);
}
if (array_key_exists('password_parameter', $value)) {
$this->_usedProperties['passwordParameter'] = true;
$this->passwordParameter = $value['password_parameter'];
unset($value['password_parameter']);
}
if (array_key_exists('csrf_parameter', $value)) {
$this->_usedProperties['csrfParameter'] = true;
$this->csrfParameter = $value['csrf_parameter'];
unset($value['csrf_parameter']);
}
if (array_key_exists('csrf_token_id', $value)) {
$this->_usedProperties['csrfTokenId'] = true;
$this->csrfTokenId = $value['csrf_token_id'];
unset($value['csrf_token_id']);
}
if (array_key_exists('enable_csrf', $value)) {
$this->_usedProperties['enableCsrf'] = true;
$this->enableCsrf = $value['enable_csrf'];
unset($value['enable_csrf']);
}
if (array_key_exists('post_only', $value)) {
$this->_usedProperties['postOnly'] = true;
$this->postOnly = $value['post_only'];
unset($value['post_only']);
}
if (array_key_exists('form_only', $value)) {
$this->_usedProperties['formOnly'] = true;
$this->formOnly = $value['form_only'];
unset($value['form_only']);
}
if (array_key_exists('always_use_default_target_path', $value)) {
$this->_usedProperties['alwaysUseDefaultTargetPath'] = true;
$this->alwaysUseDefaultTargetPath = $value['always_use_default_target_path'];
unset($value['always_use_default_target_path']);
}
if (array_key_exists('default_target_path', $value)) {
$this->_usedProperties['defaultTargetPath'] = true;
$this->defaultTargetPath = $value['default_target_path'];
unset($value['default_target_path']);
}
if (array_key_exists('target_path_parameter', $value)) {
$this->_usedProperties['targetPathParameter'] = true;
$this->targetPathParameter = $value['target_path_parameter'];
unset($value['target_path_parameter']);
}
if (array_key_exists('use_referer', $value)) {
$this->_usedProperties['useReferer'] = true;
$this->useReferer = $value['use_referer'];
unset($value['use_referer']);
}
if (array_key_exists('failure_path', $value)) {
$this->_usedProperties['failurePath'] = true;
$this->failurePath = $value['failure_path'];
unset($value['failure_path']);
}
if (array_key_exists('failure_forward', $value)) {
$this->_usedProperties['failureForward'] = true;
$this->failureForward = $value['failure_forward'];
unset($value['failure_forward']);
}
if (array_key_exists('failure_path_parameter', $value)) {
$this->_usedProperties['failurePathParameter'] = true;
$this->failurePathParameter = $value['failure_path_parameter'];
unset($value['failure_path_parameter']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('dn_string', $value)) {
$this->_usedProperties['dnString'] = true;
$this->dnString = $value['dn_string'];
unset($value['dn_string']);
}
if (array_key_exists('query_string', $value)) {
$this->_usedProperties['queryString'] = true;
$this->queryString = $value['query_string'];
unset($value['query_string']);
}
if (array_key_exists('search_dn', $value)) {
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value['search_dn'];
unset($value['search_dn']);
}
if (array_key_exists('search_password', $value)) {
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value['search_password'];
unset($value['search_password']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['rememberMe'])) {
$output['remember_me'] = $this->rememberMe;
}
if (isset($this->_usedProperties['successHandler'])) {
$output['success_handler'] = $this->successHandler;
}
if (isset($this->_usedProperties['failureHandler'])) {
$output['failure_handler'] = $this->failureHandler;
}
if (isset($this->_usedProperties['checkPath'])) {
$output['check_path'] = $this->checkPath;
}
if (isset($this->_usedProperties['useForward'])) {
$output['use_forward'] = $this->useForward;
}
if (isset($this->_usedProperties['loginPath'])) {
$output['login_path'] = $this->loginPath;
}
if (isset($this->_usedProperties['usernameParameter'])) {
$output['username_parameter'] = $this->usernameParameter;
}
if (isset($this->_usedProperties['passwordParameter'])) {
$output['password_parameter'] = $this->passwordParameter;
}
if (isset($this->_usedProperties['csrfParameter'])) {
$output['csrf_parameter'] = $this->csrfParameter;
}
if (isset($this->_usedProperties['csrfTokenId'])) {
$output['csrf_token_id'] = $this->csrfTokenId;
}
if (isset($this->_usedProperties['enableCsrf'])) {
$output['enable_csrf'] = $this->enableCsrf;
}
if (isset($this->_usedProperties['postOnly'])) {
$output['post_only'] = $this->postOnly;
}
if (isset($this->_usedProperties['formOnly'])) {
$output['form_only'] = $this->formOnly;
}
if (isset($this->_usedProperties['alwaysUseDefaultTargetPath'])) {
$output['always_use_default_target_path'] = $this->alwaysUseDefaultTargetPath;
}
if (isset($this->_usedProperties['defaultTargetPath'])) {
$output['default_target_path'] = $this->defaultTargetPath;
}
if (isset($this->_usedProperties['targetPathParameter'])) {
$output['target_path_parameter'] = $this->targetPathParameter;
}
if (isset($this->_usedProperties['useReferer'])) {
$output['use_referer'] = $this->useReferer;
}
if (isset($this->_usedProperties['failurePath'])) {
$output['failure_path'] = $this->failurePath;
}
if (isset($this->_usedProperties['failureForward'])) {
$output['failure_forward'] = $this->failureForward;
}
if (isset($this->_usedProperties['failurePathParameter'])) {
$output['failure_path_parameter'] = $this->failurePathParameter;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['dnString'])) {
$output['dn_string'] = $this->dnString;
}
if (isset($this->_usedProperties['queryString'])) {
$output['query_string'] = $this->queryString;
}
if (isset($this->_usedProperties['searchDn'])) {
$output['search_dn'] = $this->searchDn;
}
if (isset($this->_usedProperties['searchPassword'])) {
$output['search_password'] = $this->searchPassword;
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class HttpBasicConfig
{
private $provider;
private $realm;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default 'Secured Area'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function realm($value): static
{
$this->_usedProperties['realm'] = true;
$this->realm = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('realm', $value)) {
$this->_usedProperties['realm'] = true;
$this->realm = $value['realm'];
unset($value['realm']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['realm'])) {
$output['realm'] = $this->realm;
}
return $output;
}
}

View File

@@ -0,0 +1,188 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class HttpBasicLdapConfig
{
private $provider;
private $realm;
private $service;
private $dnString;
private $queryString;
private $searchDn;
private $searchPassword;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default 'Secured Area'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function realm($value): static
{
$this->_usedProperties['realm'] = true;
$this->realm = $value;
return $this;
}
/**
* @default 'ldap'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default '{user_identifier}'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function dnString($value): static
{
$this->_usedProperties['dnString'] = true;
$this->dnString = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function queryString($value): static
{
$this->_usedProperties['queryString'] = true;
$this->queryString = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchDn($value): static
{
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchPassword($value): static
{
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('realm', $value)) {
$this->_usedProperties['realm'] = true;
$this->realm = $value['realm'];
unset($value['realm']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('dn_string', $value)) {
$this->_usedProperties['dnString'] = true;
$this->dnString = $value['dn_string'];
unset($value['dn_string']);
}
if (array_key_exists('query_string', $value)) {
$this->_usedProperties['queryString'] = true;
$this->queryString = $value['query_string'];
unset($value['query_string']);
}
if (array_key_exists('search_dn', $value)) {
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value['search_dn'];
unset($value['search_dn']);
}
if (array_key_exists('search_password', $value)) {
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value['search_password'];
unset($value['search_password']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['realm'])) {
$output['realm'] = $this->realm;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['dnString'])) {
$output['dn_string'] = $this->dnString;
}
if (isset($this->_usedProperties['queryString'])) {
$output['query_string'] = $this->queryString;
}
if (isset($this->_usedProperties['searchDn'])) {
$output['search_dn'] = $this->searchDn;
}
if (isset($this->_usedProperties['searchPassword'])) {
$output['search_password'] = $this->searchPassword;
}
return $output;
}
}

View File

@@ -0,0 +1,236 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class JsonLoginConfig
{
private $provider;
private $rememberMe;
private $successHandler;
private $failureHandler;
private $checkPath;
private $useForward;
private $loginPath;
private $usernamePath;
private $passwordPath;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function rememberMe($value): static
{
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function successHandler($value): static
{
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureHandler($value): static
{
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value;
return $this;
}
/**
* @default '/login_check'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkPath($value): static
{
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useForward($value): static
{
$this->_usedProperties['useForward'] = true;
$this->useForward = $value;
return $this;
}
/**
* @default '/login'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function loginPath($value): static
{
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value;
return $this;
}
/**
* @default 'username'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function usernamePath($value): static
{
$this->_usedProperties['usernamePath'] = true;
$this->usernamePath = $value;
return $this;
}
/**
* @default 'password'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function passwordPath($value): static
{
$this->_usedProperties['passwordPath'] = true;
$this->passwordPath = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('remember_me', $value)) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value['remember_me'];
unset($value['remember_me']);
}
if (array_key_exists('success_handler', $value)) {
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value['success_handler'];
unset($value['success_handler']);
}
if (array_key_exists('failure_handler', $value)) {
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value['failure_handler'];
unset($value['failure_handler']);
}
if (array_key_exists('check_path', $value)) {
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value['check_path'];
unset($value['check_path']);
}
if (array_key_exists('use_forward', $value)) {
$this->_usedProperties['useForward'] = true;
$this->useForward = $value['use_forward'];
unset($value['use_forward']);
}
if (array_key_exists('login_path', $value)) {
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value['login_path'];
unset($value['login_path']);
}
if (array_key_exists('username_path', $value)) {
$this->_usedProperties['usernamePath'] = true;
$this->usernamePath = $value['username_path'];
unset($value['username_path']);
}
if (array_key_exists('password_path', $value)) {
$this->_usedProperties['passwordPath'] = true;
$this->passwordPath = $value['password_path'];
unset($value['password_path']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['rememberMe'])) {
$output['remember_me'] = $this->rememberMe;
}
if (isset($this->_usedProperties['successHandler'])) {
$output['success_handler'] = $this->successHandler;
}
if (isset($this->_usedProperties['failureHandler'])) {
$output['failure_handler'] = $this->failureHandler;
}
if (isset($this->_usedProperties['checkPath'])) {
$output['check_path'] = $this->checkPath;
}
if (isset($this->_usedProperties['useForward'])) {
$output['use_forward'] = $this->useForward;
}
if (isset($this->_usedProperties['loginPath'])) {
$output['login_path'] = $this->loginPath;
}
if (isset($this->_usedProperties['usernamePath'])) {
$output['username_path'] = $this->usernamePath;
}
if (isset($this->_usedProperties['passwordPath'])) {
$output['password_path'] = $this->passwordPath;
}
return $output;
}
}

View File

@@ -0,0 +1,349 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class JsonLoginLdapConfig
{
private $provider;
private $rememberMe;
private $successHandler;
private $failureHandler;
private $checkPath;
private $useForward;
private $loginPath;
private $usernamePath;
private $passwordPath;
private $service;
private $dnString;
private $queryString;
private $searchDn;
private $searchPassword;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function rememberMe($value): static
{
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function successHandler($value): static
{
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureHandler($value): static
{
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value;
return $this;
}
/**
* @default '/login_check'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkPath($value): static
{
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useForward($value): static
{
$this->_usedProperties['useForward'] = true;
$this->useForward = $value;
return $this;
}
/**
* @default '/login'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function loginPath($value): static
{
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value;
return $this;
}
/**
* @default 'username'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function usernamePath($value): static
{
$this->_usedProperties['usernamePath'] = true;
$this->usernamePath = $value;
return $this;
}
/**
* @default 'password'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function passwordPath($value): static
{
$this->_usedProperties['passwordPath'] = true;
$this->passwordPath = $value;
return $this;
}
/**
* @default 'ldap'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default '{user_identifier}'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function dnString($value): static
{
$this->_usedProperties['dnString'] = true;
$this->dnString = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function queryString($value): static
{
$this->_usedProperties['queryString'] = true;
$this->queryString = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchDn($value): static
{
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchPassword($value): static
{
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('remember_me', $value)) {
$this->_usedProperties['rememberMe'] = true;
$this->rememberMe = $value['remember_me'];
unset($value['remember_me']);
}
if (array_key_exists('success_handler', $value)) {
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value['success_handler'];
unset($value['success_handler']);
}
if (array_key_exists('failure_handler', $value)) {
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value['failure_handler'];
unset($value['failure_handler']);
}
if (array_key_exists('check_path', $value)) {
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value['check_path'];
unset($value['check_path']);
}
if (array_key_exists('use_forward', $value)) {
$this->_usedProperties['useForward'] = true;
$this->useForward = $value['use_forward'];
unset($value['use_forward']);
}
if (array_key_exists('login_path', $value)) {
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value['login_path'];
unset($value['login_path']);
}
if (array_key_exists('username_path', $value)) {
$this->_usedProperties['usernamePath'] = true;
$this->usernamePath = $value['username_path'];
unset($value['username_path']);
}
if (array_key_exists('password_path', $value)) {
$this->_usedProperties['passwordPath'] = true;
$this->passwordPath = $value['password_path'];
unset($value['password_path']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('dn_string', $value)) {
$this->_usedProperties['dnString'] = true;
$this->dnString = $value['dn_string'];
unset($value['dn_string']);
}
if (array_key_exists('query_string', $value)) {
$this->_usedProperties['queryString'] = true;
$this->queryString = $value['query_string'];
unset($value['query_string']);
}
if (array_key_exists('search_dn', $value)) {
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value['search_dn'];
unset($value['search_dn']);
}
if (array_key_exists('search_password', $value)) {
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value['search_password'];
unset($value['search_password']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['rememberMe'])) {
$output['remember_me'] = $this->rememberMe;
}
if (isset($this->_usedProperties['successHandler'])) {
$output['success_handler'] = $this->successHandler;
}
if (isset($this->_usedProperties['failureHandler'])) {
$output['failure_handler'] = $this->failureHandler;
}
if (isset($this->_usedProperties['checkPath'])) {
$output['check_path'] = $this->checkPath;
}
if (isset($this->_usedProperties['useForward'])) {
$output['use_forward'] = $this->useForward;
}
if (isset($this->_usedProperties['loginPath'])) {
$output['login_path'] = $this->loginPath;
}
if (isset($this->_usedProperties['usernamePath'])) {
$output['username_path'] = $this->usernamePath;
}
if (isset($this->_usedProperties['passwordPath'])) {
$output['password_path'] = $this->passwordPath;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['dnString'])) {
$output['dn_string'] = $this->dnString;
}
if (isset($this->_usedProperties['queryString'])) {
$output['query_string'] = $this->queryString;
}
if (isset($this->_usedProperties['searchDn'])) {
$output['search_dn'] = $this->searchDn;
}
if (isset($this->_usedProperties['searchPassword'])) {
$output['search_password'] = $this->searchPassword;
}
return $output;
}
}

View File

@@ -0,0 +1,451 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class LoginLinkConfig
{
private $checkRoute;
private $checkPostOnly;
private $signatureProperties;
private $lifetime;
private $maxUses;
private $usedLinkCache;
private $successHandler;
private $failureHandler;
private $provider;
private $secret;
private $alwaysUseDefaultTargetPath;
private $defaultTargetPath;
private $loginPath;
private $targetPathParameter;
private $useReferer;
private $failurePath;
private $failureForward;
private $failurePathParameter;
private $_usedProperties = [];
/**
* Route that will validate the login link - e.g. "app_login_link_verify".
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkRoute($value): static
{
$this->_usedProperties['checkRoute'] = true;
$this->checkRoute = $value;
return $this;
}
/**
* If true, only HTTP POST requests to "check_route" will be handled by the authenticator.
* @default false
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkPostOnly($value): static
{
$this->_usedProperties['checkPostOnly'] = true;
$this->checkPostOnly = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function signatureProperties(ParamConfigurator|array $value): static
{
$this->_usedProperties['signatureProperties'] = true;
$this->signatureProperties = $value;
return $this;
}
/**
* The lifetime of the login link in seconds.
* @default 600
* @param ParamConfigurator|int $value
* @return $this
*/
public function lifetime($value): static
{
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value;
return $this;
}
/**
* Max number of times a login link can be used - null means unlimited within lifetime.
* @default null
* @param ParamConfigurator|int $value
* @return $this
*/
public function maxUses($value): static
{
$this->_usedProperties['maxUses'] = true;
$this->maxUses = $value;
return $this;
}
/**
* Cache service id used to expired links of max_uses is set.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function usedLinkCache($value): static
{
$this->_usedProperties['usedLinkCache'] = true;
$this->usedLinkCache = $value;
return $this;
}
/**
* A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function successHandler($value): static
{
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value;
return $this;
}
/**
* A service id that implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failureHandler($value): static
{
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value;
return $this;
}
/**
* The user provider to load users from.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default '%kernel.secret%'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function secret($value): static
{
$this->_usedProperties['secret'] = true;
$this->secret = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function alwaysUseDefaultTargetPath($value): static
{
$this->_usedProperties['alwaysUseDefaultTargetPath'] = true;
$this->alwaysUseDefaultTargetPath = $value;
return $this;
}
/**
* @default '/'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function defaultTargetPath($value): static
{
$this->_usedProperties['defaultTargetPath'] = true;
$this->defaultTargetPath = $value;
return $this;
}
/**
* @default '/login'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function loginPath($value): static
{
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value;
return $this;
}
/**
* @default '_target_path'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function targetPathParameter($value): static
{
$this->_usedProperties['targetPathParameter'] = true;
$this->targetPathParameter = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function useReferer($value): static
{
$this->_usedProperties['useReferer'] = true;
$this->useReferer = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failurePath($value): static
{
$this->_usedProperties['failurePath'] = true;
$this->failurePath = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function failureForward($value): static
{
$this->_usedProperties['failureForward'] = true;
$this->failureForward = $value;
return $this;
}
/**
* @default '_failure_path'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function failurePathParameter($value): static
{
$this->_usedProperties['failurePathParameter'] = true;
$this->failurePathParameter = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('check_route', $value)) {
$this->_usedProperties['checkRoute'] = true;
$this->checkRoute = $value['check_route'];
unset($value['check_route']);
}
if (array_key_exists('check_post_only', $value)) {
$this->_usedProperties['checkPostOnly'] = true;
$this->checkPostOnly = $value['check_post_only'];
unset($value['check_post_only']);
}
if (array_key_exists('signature_properties', $value)) {
$this->_usedProperties['signatureProperties'] = true;
$this->signatureProperties = $value['signature_properties'];
unset($value['signature_properties']);
}
if (array_key_exists('lifetime', $value)) {
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value['lifetime'];
unset($value['lifetime']);
}
if (array_key_exists('max_uses', $value)) {
$this->_usedProperties['maxUses'] = true;
$this->maxUses = $value['max_uses'];
unset($value['max_uses']);
}
if (array_key_exists('used_link_cache', $value)) {
$this->_usedProperties['usedLinkCache'] = true;
$this->usedLinkCache = $value['used_link_cache'];
unset($value['used_link_cache']);
}
if (array_key_exists('success_handler', $value)) {
$this->_usedProperties['successHandler'] = true;
$this->successHandler = $value['success_handler'];
unset($value['success_handler']);
}
if (array_key_exists('failure_handler', $value)) {
$this->_usedProperties['failureHandler'] = true;
$this->failureHandler = $value['failure_handler'];
unset($value['failure_handler']);
}
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('secret', $value)) {
$this->_usedProperties['secret'] = true;
$this->secret = $value['secret'];
unset($value['secret']);
}
if (array_key_exists('always_use_default_target_path', $value)) {
$this->_usedProperties['alwaysUseDefaultTargetPath'] = true;
$this->alwaysUseDefaultTargetPath = $value['always_use_default_target_path'];
unset($value['always_use_default_target_path']);
}
if (array_key_exists('default_target_path', $value)) {
$this->_usedProperties['defaultTargetPath'] = true;
$this->defaultTargetPath = $value['default_target_path'];
unset($value['default_target_path']);
}
if (array_key_exists('login_path', $value)) {
$this->_usedProperties['loginPath'] = true;
$this->loginPath = $value['login_path'];
unset($value['login_path']);
}
if (array_key_exists('target_path_parameter', $value)) {
$this->_usedProperties['targetPathParameter'] = true;
$this->targetPathParameter = $value['target_path_parameter'];
unset($value['target_path_parameter']);
}
if (array_key_exists('use_referer', $value)) {
$this->_usedProperties['useReferer'] = true;
$this->useReferer = $value['use_referer'];
unset($value['use_referer']);
}
if (array_key_exists('failure_path', $value)) {
$this->_usedProperties['failurePath'] = true;
$this->failurePath = $value['failure_path'];
unset($value['failure_path']);
}
if (array_key_exists('failure_forward', $value)) {
$this->_usedProperties['failureForward'] = true;
$this->failureForward = $value['failure_forward'];
unset($value['failure_forward']);
}
if (array_key_exists('failure_path_parameter', $value)) {
$this->_usedProperties['failurePathParameter'] = true;
$this->failurePathParameter = $value['failure_path_parameter'];
unset($value['failure_path_parameter']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['checkRoute'])) {
$output['check_route'] = $this->checkRoute;
}
if (isset($this->_usedProperties['checkPostOnly'])) {
$output['check_post_only'] = $this->checkPostOnly;
}
if (isset($this->_usedProperties['signatureProperties'])) {
$output['signature_properties'] = $this->signatureProperties;
}
if (isset($this->_usedProperties['lifetime'])) {
$output['lifetime'] = $this->lifetime;
}
if (isset($this->_usedProperties['maxUses'])) {
$output['max_uses'] = $this->maxUses;
}
if (isset($this->_usedProperties['usedLinkCache'])) {
$output['used_link_cache'] = $this->usedLinkCache;
}
if (isset($this->_usedProperties['successHandler'])) {
$output['success_handler'] = $this->successHandler;
}
if (isset($this->_usedProperties['failureHandler'])) {
$output['failure_handler'] = $this->failureHandler;
}
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['secret'])) {
$output['secret'] = $this->secret;
}
if (isset($this->_usedProperties['alwaysUseDefaultTargetPath'])) {
$output['always_use_default_target_path'] = $this->alwaysUseDefaultTargetPath;
}
if (isset($this->_usedProperties['defaultTargetPath'])) {
$output['default_target_path'] = $this->defaultTargetPath;
}
if (isset($this->_usedProperties['loginPath'])) {
$output['login_path'] = $this->loginPath;
}
if (isset($this->_usedProperties['targetPathParameter'])) {
$output['target_path_parameter'] = $this->targetPathParameter;
}
if (isset($this->_usedProperties['useReferer'])) {
$output['use_referer'] = $this->useReferer;
}
if (isset($this->_usedProperties['failurePath'])) {
$output['failure_path'] = $this->failurePath;
}
if (isset($this->_usedProperties['failureForward'])) {
$output['failure_forward'] = $this->failureForward;
}
if (isset($this->_usedProperties['failurePathParameter'])) {
$output['failure_path_parameter'] = $this->failurePathParameter;
}
return $output;
}
}

View File

@@ -0,0 +1,123 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class LoginThrottlingConfig
{
private $limiter;
private $maxAttempts;
private $interval;
private $lockFactory;
private $_usedProperties = [];
/**
* A service id implementing "Symfony\Component\HttpFoundation\RateLimiter\RequestRateLimiterInterface".
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function limiter($value): static
{
$this->_usedProperties['limiter'] = true;
$this->limiter = $value;
return $this;
}
/**
* @default 5
* @param ParamConfigurator|int $value
* @return $this
*/
public function maxAttempts($value): static
{
$this->_usedProperties['maxAttempts'] = true;
$this->maxAttempts = $value;
return $this;
}
/**
* @default '1 minute'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function interval($value): static
{
$this->_usedProperties['interval'] = true;
$this->interval = $value;
return $this;
}
/**
* The service ID of the lock factory used by the login rate limiter (or null to disable locking).
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function lockFactory($value): static
{
$this->_usedProperties['lockFactory'] = true;
$this->lockFactory = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('limiter', $value)) {
$this->_usedProperties['limiter'] = true;
$this->limiter = $value['limiter'];
unset($value['limiter']);
}
if (array_key_exists('max_attempts', $value)) {
$this->_usedProperties['maxAttempts'] = true;
$this->maxAttempts = $value['max_attempts'];
unset($value['max_attempts']);
}
if (array_key_exists('interval', $value)) {
$this->_usedProperties['interval'] = true;
$this->interval = $value['interval'];
unset($value['interval']);
}
if (array_key_exists('lock_factory', $value)) {
$this->_usedProperties['lockFactory'] = true;
$this->lockFactory = $value['lock_factory'];
unset($value['lock_factory']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['limiter'])) {
$output['limiter'] = $this->limiter;
}
if (isset($this->_usedProperties['maxAttempts'])) {
$output['max_attempts'] = $this->maxAttempts;
}
if (isset($this->_usedProperties['interval'])) {
$output['interval'] = $this->interval;
}
if (isset($this->_usedProperties['lockFactory'])) {
$output['lock_factory'] = $this->lockFactory;
}
return $output;
}
}

View File

@@ -0,0 +1,144 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\Logout;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class DeleteCookieConfig
{
private $path;
private $domain;
private $secure;
private $samesite;
private $partitioned;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function path($value): static
{
$this->_usedProperties['path'] = true;
$this->path = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function domain($value): static
{
$this->_usedProperties['domain'] = true;
$this->domain = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function secure($value): static
{
$this->_usedProperties['secure'] = true;
$this->secure = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function samesite($value): static
{
$this->_usedProperties['samesite'] = true;
$this->samesite = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function partitioned($value): static
{
$this->_usedProperties['partitioned'] = true;
$this->partitioned = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('path', $value)) {
$this->_usedProperties['path'] = true;
$this->path = $value['path'];
unset($value['path']);
}
if (array_key_exists('domain', $value)) {
$this->_usedProperties['domain'] = true;
$this->domain = $value['domain'];
unset($value['domain']);
}
if (array_key_exists('secure', $value)) {
$this->_usedProperties['secure'] = true;
$this->secure = $value['secure'];
unset($value['secure']);
}
if (array_key_exists('samesite', $value)) {
$this->_usedProperties['samesite'] = true;
$this->samesite = $value['samesite'];
unset($value['samesite']);
}
if (array_key_exists('partitioned', $value)) {
$this->_usedProperties['partitioned'] = true;
$this->partitioned = $value['partitioned'];
unset($value['partitioned']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['path'])) {
$output['path'] = $this->path;
}
if (isset($this->_usedProperties['domain'])) {
$output['domain'] = $this->domain;
}
if (isset($this->_usedProperties['secure'])) {
$output['secure'] = $this->secure;
}
if (isset($this->_usedProperties['samesite'])) {
$output['samesite'] = $this->samesite;
}
if (isset($this->_usedProperties['partitioned'])) {
$output['partitioned'] = $this->partitioned;
}
return $output;
}
}

View File

@@ -0,0 +1,237 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Logout'.\DIRECTORY_SEPARATOR.'DeleteCookieConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class LogoutConfig
{
private $enableCsrf;
private $csrfTokenId;
private $csrfParameter;
private $csrfTokenManager;
private $path;
private $target;
private $invalidateSession;
private $clearSiteData;
private $deleteCookies;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enableCsrf($value): static
{
$this->_usedProperties['enableCsrf'] = true;
$this->enableCsrf = $value;
return $this;
}
/**
* @default 'logout'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfTokenId($value): static
{
$this->_usedProperties['csrfTokenId'] = true;
$this->csrfTokenId = $value;
return $this;
}
/**
* @default '_csrf_token'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfParameter($value): static
{
$this->_usedProperties['csrfParameter'] = true;
$this->csrfParameter = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function csrfTokenManager($value): static
{
$this->_usedProperties['csrfTokenManager'] = true;
$this->csrfTokenManager = $value;
return $this;
}
/**
* @default '/logout'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function path($value): static
{
$this->_usedProperties['path'] = true;
$this->path = $value;
return $this;
}
/**
* @default '/'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function target($value): static
{
$this->_usedProperties['target'] = true;
$this->target = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function invalidateSession($value): static
{
$this->_usedProperties['invalidateSession'] = true;
$this->invalidateSession = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function clearSiteData(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['clearSiteData'] = true;
$this->clearSiteData = $value;
return $this;
}
public function deleteCookie(string $name, array $value = []): \Symfony\Config\Security\FirewallConfig\Logout\DeleteCookieConfig
{
if (!isset($this->deleteCookies[$name])) {
$this->_usedProperties['deleteCookies'] = true;
$this->deleteCookies[$name] = new \Symfony\Config\Security\FirewallConfig\Logout\DeleteCookieConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "deleteCookie()" has already been initialized. You cannot pass values the second time you call deleteCookie().');
}
return $this->deleteCookies[$name];
}
public function __construct(array $value = [])
{
if (array_key_exists('enable_csrf', $value)) {
$this->_usedProperties['enableCsrf'] = true;
$this->enableCsrf = $value['enable_csrf'];
unset($value['enable_csrf']);
}
if (array_key_exists('csrf_token_id', $value)) {
$this->_usedProperties['csrfTokenId'] = true;
$this->csrfTokenId = $value['csrf_token_id'];
unset($value['csrf_token_id']);
}
if (array_key_exists('csrf_parameter', $value)) {
$this->_usedProperties['csrfParameter'] = true;
$this->csrfParameter = $value['csrf_parameter'];
unset($value['csrf_parameter']);
}
if (array_key_exists('csrf_token_manager', $value)) {
$this->_usedProperties['csrfTokenManager'] = true;
$this->csrfTokenManager = $value['csrf_token_manager'];
unset($value['csrf_token_manager']);
}
if (array_key_exists('path', $value)) {
$this->_usedProperties['path'] = true;
$this->path = $value['path'];
unset($value['path']);
}
if (array_key_exists('target', $value)) {
$this->_usedProperties['target'] = true;
$this->target = $value['target'];
unset($value['target']);
}
if (array_key_exists('invalidate_session', $value)) {
$this->_usedProperties['invalidateSession'] = true;
$this->invalidateSession = $value['invalidate_session'];
unset($value['invalidate_session']);
}
if (array_key_exists('clear_site_data', $value)) {
$this->_usedProperties['clearSiteData'] = true;
$this->clearSiteData = $value['clear_site_data'];
unset($value['clear_site_data']);
}
if (array_key_exists('delete_cookies', $value)) {
$this->_usedProperties['deleteCookies'] = true;
$this->deleteCookies = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Security\FirewallConfig\Logout\DeleteCookieConfig($v) : $v, $value['delete_cookies']);
unset($value['delete_cookies']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enableCsrf'])) {
$output['enable_csrf'] = $this->enableCsrf;
}
if (isset($this->_usedProperties['csrfTokenId'])) {
$output['csrf_token_id'] = $this->csrfTokenId;
}
if (isset($this->_usedProperties['csrfParameter'])) {
$output['csrf_parameter'] = $this->csrfParameter;
}
if (isset($this->_usedProperties['csrfTokenManager'])) {
$output['csrf_token_manager'] = $this->csrfTokenManager;
}
if (isset($this->_usedProperties['path'])) {
$output['path'] = $this->path;
}
if (isset($this->_usedProperties['target'])) {
$output['target'] = $this->target;
}
if (isset($this->_usedProperties['invalidateSession'])) {
$output['invalidate_session'] = $this->invalidateSession;
}
if (isset($this->_usedProperties['clearSiteData'])) {
$output['clear_site_data'] = $this->clearSiteData;
}
if (isset($this->_usedProperties['deleteCookies'])) {
$output['delete_cookies'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Security\FirewallConfig\Logout\DeleteCookieConfig ? $v->toArray() : $v, $this->deleteCookies);
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\RememberMe\TokenProvider;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class DoctrineConfig
{
private $enabled;
private $connection;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function connection($value): static
{
$this->_usedProperties['connection'] = true;
$this->connection = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('connection', $value)) {
$this->_usedProperties['connection'] = true;
$this->connection = $value['connection'];
unset($value['connection']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['connection'])) {
$output['connection'] = $this->connection;
}
return $output;
}
}

View File

@@ -0,0 +1,80 @@
<?php
namespace Symfony\Config\Security\FirewallConfig\RememberMe;
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenProvider'.\DIRECTORY_SEPARATOR.'DoctrineConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class TokenProviderConfig
{
private $service;
private $doctrine;
private $_usedProperties = [];
/**
* The service ID of a custom rememberme token provider.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default {"enabled":false,"connection":null}
*/
public function doctrine(array $value = []): \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProvider\DoctrineConfig
{
if (null === $this->doctrine) {
$this->_usedProperties['doctrine'] = true;
$this->doctrine = new \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProvider\DoctrineConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "doctrine()" has already been initialized. You cannot pass values the second time you call doctrine().');
}
return $this->doctrine;
}
public function __construct(array $value = [])
{
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('doctrine', $value)) {
$this->_usedProperties['doctrine'] = true;
$this->doctrine = \is_array($value['doctrine']) ? new \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProvider\DoctrineConfig($value['doctrine']) : $value['doctrine'];
unset($value['doctrine']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['doctrine'])) {
$output['doctrine'] = $this->doctrine instanceof \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProvider\DoctrineConfig ? $this->doctrine->toArray() : $this->doctrine;
}
return $output;
}
}

View File

@@ -0,0 +1,412 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'RememberMe'.\DIRECTORY_SEPARATOR.'TokenProviderConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class RememberMeConfig
{
private $secret;
private $service;
private $userProviders;
private $catchExceptions;
private $signatureProperties;
private $tokenProvider;
private $tokenVerifier;
private $name;
private $lifetime;
private $path;
private $domain;
private $secure;
private $httponly;
private $samesite;
private $alwaysRememberMe;
private $rememberMeParameter;
private $_usedProperties = [];
/**
* @default '%kernel.secret%'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function secret($value): static
{
$this->_usedProperties['secret'] = true;
$this->secret = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function userProviders(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['userProviders'] = true;
$this->userProviders = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function catchExceptions($value): static
{
$this->_usedProperties['catchExceptions'] = true;
$this->catchExceptions = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function signatureProperties(ParamConfigurator|array $value): static
{
$this->_usedProperties['signatureProperties'] = true;
$this->signatureProperties = $value;
return $this;
}
/**
* @template TValue of string|array
* @param TValue $value
* @return \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig : static)
*/
public function tokenProvider(string|array $value = []): \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['tokenProvider'] = true;
$this->tokenProvider = $value;
return $this;
}
if (!$this->tokenProvider instanceof \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig) {
$this->_usedProperties['tokenProvider'] = true;
$this->tokenProvider = new \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "tokenProvider()" has already been initialized. You cannot pass values the second time you call tokenProvider().');
}
return $this->tokenProvider;
}
/**
* The service ID of a custom rememberme token verifier.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function tokenVerifier($value): static
{
$this->_usedProperties['tokenVerifier'] = true;
$this->tokenVerifier = $value;
return $this;
}
/**
* @default 'REMEMBERME'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function name($value): static
{
$this->_usedProperties['name'] = true;
$this->name = $value;
return $this;
}
/**
* @default 31536000
* @param ParamConfigurator|int $value
* @return $this
*/
public function lifetime($value): static
{
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value;
return $this;
}
/**
* @default '/'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function path($value): static
{
$this->_usedProperties['path'] = true;
$this->path = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function domain($value): static
{
$this->_usedProperties['domain'] = true;
$this->domain = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|true|false|'auto' $value
* @return $this
*/
public function secure($value): static
{
$this->_usedProperties['secure'] = true;
$this->secure = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function httponly($value): static
{
$this->_usedProperties['httponly'] = true;
$this->httponly = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|NULL|'lax'|'strict'|'none' $value
* @return $this
*/
public function samesite($value): static
{
$this->_usedProperties['samesite'] = true;
$this->samesite = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function alwaysRememberMe($value): static
{
$this->_usedProperties['alwaysRememberMe'] = true;
$this->alwaysRememberMe = $value;
return $this;
}
/**
* @default '_remember_me'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function rememberMeParameter($value): static
{
$this->_usedProperties['rememberMeParameter'] = true;
$this->rememberMeParameter = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('secret', $value)) {
$this->_usedProperties['secret'] = true;
$this->secret = $value['secret'];
unset($value['secret']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('user_providers', $value)) {
$this->_usedProperties['userProviders'] = true;
$this->userProviders = $value['user_providers'];
unset($value['user_providers']);
}
if (array_key_exists('catch_exceptions', $value)) {
$this->_usedProperties['catchExceptions'] = true;
$this->catchExceptions = $value['catch_exceptions'];
unset($value['catch_exceptions']);
}
if (array_key_exists('signature_properties', $value)) {
$this->_usedProperties['signatureProperties'] = true;
$this->signatureProperties = $value['signature_properties'];
unset($value['signature_properties']);
}
if (array_key_exists('token_provider', $value)) {
$this->_usedProperties['tokenProvider'] = true;
$this->tokenProvider = \is_array($value['token_provider']) ? new \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig($value['token_provider']) : $value['token_provider'];
unset($value['token_provider']);
}
if (array_key_exists('token_verifier', $value)) {
$this->_usedProperties['tokenVerifier'] = true;
$this->tokenVerifier = $value['token_verifier'];
unset($value['token_verifier']);
}
if (array_key_exists('name', $value)) {
$this->_usedProperties['name'] = true;
$this->name = $value['name'];
unset($value['name']);
}
if (array_key_exists('lifetime', $value)) {
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value['lifetime'];
unset($value['lifetime']);
}
if (array_key_exists('path', $value)) {
$this->_usedProperties['path'] = true;
$this->path = $value['path'];
unset($value['path']);
}
if (array_key_exists('domain', $value)) {
$this->_usedProperties['domain'] = true;
$this->domain = $value['domain'];
unset($value['domain']);
}
if (array_key_exists('secure', $value)) {
$this->_usedProperties['secure'] = true;
$this->secure = $value['secure'];
unset($value['secure']);
}
if (array_key_exists('httponly', $value)) {
$this->_usedProperties['httponly'] = true;
$this->httponly = $value['httponly'];
unset($value['httponly']);
}
if (array_key_exists('samesite', $value)) {
$this->_usedProperties['samesite'] = true;
$this->samesite = $value['samesite'];
unset($value['samesite']);
}
if (array_key_exists('always_remember_me', $value)) {
$this->_usedProperties['alwaysRememberMe'] = true;
$this->alwaysRememberMe = $value['always_remember_me'];
unset($value['always_remember_me']);
}
if (array_key_exists('remember_me_parameter', $value)) {
$this->_usedProperties['rememberMeParameter'] = true;
$this->rememberMeParameter = $value['remember_me_parameter'];
unset($value['remember_me_parameter']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['secret'])) {
$output['secret'] = $this->secret;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['userProviders'])) {
$output['user_providers'] = $this->userProviders;
}
if (isset($this->_usedProperties['catchExceptions'])) {
$output['catch_exceptions'] = $this->catchExceptions;
}
if (isset($this->_usedProperties['signatureProperties'])) {
$output['signature_properties'] = $this->signatureProperties;
}
if (isset($this->_usedProperties['tokenProvider'])) {
$output['token_provider'] = $this->tokenProvider instanceof \Symfony\Config\Security\FirewallConfig\RememberMe\TokenProviderConfig ? $this->tokenProvider->toArray() : $this->tokenProvider;
}
if (isset($this->_usedProperties['tokenVerifier'])) {
$output['token_verifier'] = $this->tokenVerifier;
}
if (isset($this->_usedProperties['name'])) {
$output['name'] = $this->name;
}
if (isset($this->_usedProperties['lifetime'])) {
$output['lifetime'] = $this->lifetime;
}
if (isset($this->_usedProperties['path'])) {
$output['path'] = $this->path;
}
if (isset($this->_usedProperties['domain'])) {
$output['domain'] = $this->domain;
}
if (isset($this->_usedProperties['secure'])) {
$output['secure'] = $this->secure;
}
if (isset($this->_usedProperties['httponly'])) {
$output['httponly'] = $this->httponly;
}
if (isset($this->_usedProperties['samesite'])) {
$output['samesite'] = $this->samesite;
}
if (isset($this->_usedProperties['alwaysRememberMe'])) {
$output['always_remember_me'] = $this->alwaysRememberMe;
}
if (isset($this->_usedProperties['rememberMeParameter'])) {
$output['remember_me_parameter'] = $this->rememberMeParameter;
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class RemoteUserConfig
{
private $provider;
private $user;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default 'REMOTE_USER'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function user($value): static
{
$this->_usedProperties['user'] = true;
$this->user = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('user', $value)) {
$this->_usedProperties['user'] = true;
$this->user = $value['user'];
unset($value['user']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['user'])) {
$output['user'] = $this->user;
}
return $output;
}
}

View File

@@ -0,0 +1,121 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class SwitchUserConfig
{
private $provider;
private $parameter;
private $role;
private $targetRoute;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default '_switch_user'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function parameter($value): static
{
$this->_usedProperties['parameter'] = true;
$this->parameter = $value;
return $this;
}
/**
* @default 'ROLE_ALLOWED_TO_SWITCH'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function role($value): static
{
$this->_usedProperties['role'] = true;
$this->role = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function targetRoute($value): static
{
$this->_usedProperties['targetRoute'] = true;
$this->targetRoute = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('parameter', $value)) {
$this->_usedProperties['parameter'] = true;
$this->parameter = $value['parameter'];
unset($value['parameter']);
}
if (array_key_exists('role', $value)) {
$this->_usedProperties['role'] = true;
$this->role = $value['role'];
unset($value['role']);
}
if (array_key_exists('target_route', $value)) {
$this->_usedProperties['targetRoute'] = true;
$this->targetRoute = $value['target_route'];
unset($value['target_route']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['parameter'])) {
$output['parameter'] = $this->parameter;
}
if (isset($this->_usedProperties['role'])) {
$output['role'] = $this->role;
}
if (isset($this->_usedProperties['targetRoute'])) {
$output['target_route'] = $this->targetRoute;
}
return $output;
}
}

View File

@@ -0,0 +1,121 @@
<?php
namespace Symfony\Config\Security\FirewallConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class X509Config
{
private $provider;
private $user;
private $credentials;
private $userIdentifier;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function provider($value): static
{
$this->_usedProperties['provider'] = true;
$this->provider = $value;
return $this;
}
/**
* @default 'SSL_CLIENT_S_DN_Email'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function user($value): static
{
$this->_usedProperties['user'] = true;
$this->user = $value;
return $this;
}
/**
* @default 'SSL_CLIENT_S_DN'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function credentials($value): static
{
$this->_usedProperties['credentials'] = true;
$this->credentials = $value;
return $this;
}
/**
* @default 'emailAddress'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function userIdentifier($value): static
{
$this->_usedProperties['userIdentifier'] = true;
$this->userIdentifier = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('provider', $value)) {
$this->_usedProperties['provider'] = true;
$this->provider = $value['provider'];
unset($value['provider']);
}
if (array_key_exists('user', $value)) {
$this->_usedProperties['user'] = true;
$this->user = $value['user'];
unset($value['user']);
}
if (array_key_exists('credentials', $value)) {
$this->_usedProperties['credentials'] = true;
$this->credentials = $value['credentials'];
unset($value['credentials']);
}
if (array_key_exists('user_identifier', $value)) {
$this->_usedProperties['userIdentifier'] = true;
$this->userIdentifier = $value['user_identifier'];
unset($value['user_identifier']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['provider'])) {
$output['provider'] = $this->provider;
}
if (isset($this->_usedProperties['user'])) {
$output['user'] = $this->user;
}
if (isset($this->_usedProperties['credentials'])) {
$output['credentials'] = $this->credentials;
}
if (isset($this->_usedProperties['userIdentifier'])) {
$output['user_identifier'] = $this->userIdentifier;
}
return $output;
}
}

View File

@@ -0,0 +1,283 @@
<?php
namespace Symfony\Config\Security;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class PasswordHasherConfig
{
private $algorithm;
private $migrateFrom;
private $hashAlgorithm;
private $keyLength;
private $ignoreCase;
private $encodeAsBase64;
private $iterations;
private $cost;
private $memoryCost;
private $timeCost;
private $id;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function algorithm($value): static
{
$this->_usedProperties['algorithm'] = true;
$this->algorithm = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|mixed $value
*
* @return $this
*/
public function migrateFrom(mixed $value): static
{
$this->_usedProperties['migrateFrom'] = true;
$this->migrateFrom = $value;
return $this;
}
/**
* Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms.
* @default 'sha512'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function hashAlgorithm($value): static
{
$this->_usedProperties['hashAlgorithm'] = true;
$this->hashAlgorithm = $value;
return $this;
}
/**
* @default 40
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function keyLength($value): static
{
$this->_usedProperties['keyLength'] = true;
$this->keyLength = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function ignoreCase($value): static
{
$this->_usedProperties['ignoreCase'] = true;
$this->ignoreCase = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function encodeAsBase64($value): static
{
$this->_usedProperties['encodeAsBase64'] = true;
$this->encodeAsBase64 = $value;
return $this;
}
/**
* @default 5000
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function iterations($value): static
{
$this->_usedProperties['iterations'] = true;
$this->iterations = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|int $value
* @return $this
*/
public function cost($value): static
{
$this->_usedProperties['cost'] = true;
$this->cost = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function memoryCost($value): static
{
$this->_usedProperties['memoryCost'] = true;
$this->memoryCost = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function timeCost($value): static
{
$this->_usedProperties['timeCost'] = true;
$this->timeCost = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('algorithm', $value)) {
$this->_usedProperties['algorithm'] = true;
$this->algorithm = $value['algorithm'];
unset($value['algorithm']);
}
if (array_key_exists('migrate_from', $value)) {
$this->_usedProperties['migrateFrom'] = true;
$this->migrateFrom = $value['migrate_from'];
unset($value['migrate_from']);
}
if (array_key_exists('hash_algorithm', $value)) {
$this->_usedProperties['hashAlgorithm'] = true;
$this->hashAlgorithm = $value['hash_algorithm'];
unset($value['hash_algorithm']);
}
if (array_key_exists('key_length', $value)) {
$this->_usedProperties['keyLength'] = true;
$this->keyLength = $value['key_length'];
unset($value['key_length']);
}
if (array_key_exists('ignore_case', $value)) {
$this->_usedProperties['ignoreCase'] = true;
$this->ignoreCase = $value['ignore_case'];
unset($value['ignore_case']);
}
if (array_key_exists('encode_as_base64', $value)) {
$this->_usedProperties['encodeAsBase64'] = true;
$this->encodeAsBase64 = $value['encode_as_base64'];
unset($value['encode_as_base64']);
}
if (array_key_exists('iterations', $value)) {
$this->_usedProperties['iterations'] = true;
$this->iterations = $value['iterations'];
unset($value['iterations']);
}
if (array_key_exists('cost', $value)) {
$this->_usedProperties['cost'] = true;
$this->cost = $value['cost'];
unset($value['cost']);
}
if (array_key_exists('memory_cost', $value)) {
$this->_usedProperties['memoryCost'] = true;
$this->memoryCost = $value['memory_cost'];
unset($value['memory_cost']);
}
if (array_key_exists('time_cost', $value)) {
$this->_usedProperties['timeCost'] = true;
$this->timeCost = $value['time_cost'];
unset($value['time_cost']);
}
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['algorithm'])) {
$output['algorithm'] = $this->algorithm;
}
if (isset($this->_usedProperties['migrateFrom'])) {
$output['migrate_from'] = $this->migrateFrom;
}
if (isset($this->_usedProperties['hashAlgorithm'])) {
$output['hash_algorithm'] = $this->hashAlgorithm;
}
if (isset($this->_usedProperties['keyLength'])) {
$output['key_length'] = $this->keyLength;
}
if (isset($this->_usedProperties['ignoreCase'])) {
$output['ignore_case'] = $this->ignoreCase;
}
if (isset($this->_usedProperties['encodeAsBase64'])) {
$output['encode_as_base64'] = $this->encodeAsBase64;
}
if (isset($this->_usedProperties['iterations'])) {
$output['iterations'] = $this->iterations;
}
if (isset($this->_usedProperties['cost'])) {
$output['cost'] = $this->cost;
}
if (isset($this->_usedProperties['memoryCost'])) {
$output['memory_cost'] = $this->memoryCost;
}
if (isset($this->_usedProperties['timeCost'])) {
$output['time_cost'] = $this->timeCost;
}
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
return $output;
}
}

View File

@@ -0,0 +1,145 @@
<?php
namespace Symfony\Config\Security;
require_once __DIR__.\DIRECTORY_SEPARATOR.'ProviderConfig'.\DIRECTORY_SEPARATOR.'ChainConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'ProviderConfig'.\DIRECTORY_SEPARATOR.'EntityConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'ProviderConfig'.\DIRECTORY_SEPARATOR.'MemoryConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'ProviderConfig'.\DIRECTORY_SEPARATOR.'LdapConfig.php';
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class ProviderConfig
{
private $id;
private $chain;
private $entity;
private $memory;
private $ldap;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
public function chain(array $value = []): \Symfony\Config\Security\ProviderConfig\ChainConfig
{
if (null === $this->chain) {
$this->_usedProperties['chain'] = true;
$this->chain = new \Symfony\Config\Security\ProviderConfig\ChainConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "chain()" has already been initialized. You cannot pass values the second time you call chain().');
}
return $this->chain;
}
public function entity(array $value = []): \Symfony\Config\Security\ProviderConfig\EntityConfig
{
if (null === $this->entity) {
$this->_usedProperties['entity'] = true;
$this->entity = new \Symfony\Config\Security\ProviderConfig\EntityConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "entity()" has already been initialized. You cannot pass values the second time you call entity().');
}
return $this->entity;
}
public function memory(array $value = []): \Symfony\Config\Security\ProviderConfig\MemoryConfig
{
if (null === $this->memory) {
$this->_usedProperties['memory'] = true;
$this->memory = new \Symfony\Config\Security\ProviderConfig\MemoryConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "memory()" has already been initialized. You cannot pass values the second time you call memory().');
}
return $this->memory;
}
public function ldap(array $value = []): \Symfony\Config\Security\ProviderConfig\LdapConfig
{
if (null === $this->ldap) {
$this->_usedProperties['ldap'] = true;
$this->ldap = new \Symfony\Config\Security\ProviderConfig\LdapConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "ldap()" has already been initialized. You cannot pass values the second time you call ldap().');
}
return $this->ldap;
}
public function __construct(array $value = [])
{
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('chain', $value)) {
$this->_usedProperties['chain'] = true;
$this->chain = new \Symfony\Config\Security\ProviderConfig\ChainConfig($value['chain']);
unset($value['chain']);
}
if (array_key_exists('entity', $value)) {
$this->_usedProperties['entity'] = true;
$this->entity = new \Symfony\Config\Security\ProviderConfig\EntityConfig($value['entity']);
unset($value['entity']);
}
if (array_key_exists('memory', $value)) {
$this->_usedProperties['memory'] = true;
$this->memory = new \Symfony\Config\Security\ProviderConfig\MemoryConfig($value['memory']);
unset($value['memory']);
}
if (array_key_exists('ldap', $value)) {
$this->_usedProperties['ldap'] = true;
$this->ldap = new \Symfony\Config\Security\ProviderConfig\LdapConfig($value['ldap']);
unset($value['ldap']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['chain'])) {
$output['chain'] = $this->chain->toArray();
}
if (isset($this->_usedProperties['entity'])) {
$output['entity'] = $this->entity->toArray();
}
if (isset($this->_usedProperties['memory'])) {
$output['memory'] = $this->memory->toArray();
}
if (isset($this->_usedProperties['ldap'])) {
$output['ldap'] = $this->ldap->toArray();
}
return $output;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace Symfony\Config\Security\ProviderConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class ChainConfig
{
private $providers;
private $_usedProperties = [];
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function providers(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['providers'] = true;
$this->providers = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('providers', $value)) {
$this->_usedProperties['providers'] = true;
$this->providers = $value['providers'];
unset($value['providers']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['providers'])) {
$output['providers'] = $this->providers;
}
return $output;
}
}

View File

@@ -0,0 +1,99 @@
<?php
namespace Symfony\Config\Security\ProviderConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class EntityConfig
{
private $class;
private $property;
private $managerName;
private $_usedProperties = [];
/**
* The full entity class name of your user class.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function class($value): static
{
$this->_usedProperties['class'] = true;
$this->class = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function property($value): static
{
$this->_usedProperties['property'] = true;
$this->property = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function managerName($value): static
{
$this->_usedProperties['managerName'] = true;
$this->managerName = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('class', $value)) {
$this->_usedProperties['class'] = true;
$this->class = $value['class'];
unset($value['class']);
}
if (array_key_exists('property', $value)) {
$this->_usedProperties['property'] = true;
$this->property = $value['property'];
unset($value['property']);
}
if (array_key_exists('manager_name', $value)) {
$this->_usedProperties['managerName'] = true;
$this->managerName = $value['manager_name'];
unset($value['manager_name']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['class'])) {
$output['class'] = $this->class;
}
if (isset($this->_usedProperties['property'])) {
$output['property'] = $this->property;
}
if (isset($this->_usedProperties['managerName'])) {
$output['manager_name'] = $this->managerName;
}
return $output;
}
}

View File

@@ -0,0 +1,259 @@
<?php
namespace Symfony\Config\Security\ProviderConfig;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class LdapConfig
{
private $service;
private $baseDn;
private $searchDn;
private $searchPassword;
private $extraFields;
private $defaultRoles;
private $roleFetcher;
private $uidKey;
private $filter;
private $passwordAttribute;
private $_usedProperties = [];
/**
* @default 'ldap'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function baseDn($value): static
{
$this->_usedProperties['baseDn'] = true;
$this->baseDn = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchDn($value): static
{
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function searchPassword($value): static
{
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function extraFields(ParamConfigurator|array $value): static
{
$this->_usedProperties['extraFields'] = true;
$this->extraFields = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function defaultRoles(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['defaultRoles'] = true;
$this->defaultRoles = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function roleFetcher($value): static
{
$this->_usedProperties['roleFetcher'] = true;
$this->roleFetcher = $value;
return $this;
}
/**
* @default 'sAMAccountName'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function uidKey($value): static
{
$this->_usedProperties['uidKey'] = true;
$this->uidKey = $value;
return $this;
}
/**
* @default '({uid_key}={user_identifier})'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function filter($value): static
{
$this->_usedProperties['filter'] = true;
$this->filter = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function passwordAttribute($value): static
{
$this->_usedProperties['passwordAttribute'] = true;
$this->passwordAttribute = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('base_dn', $value)) {
$this->_usedProperties['baseDn'] = true;
$this->baseDn = $value['base_dn'];
unset($value['base_dn']);
}
if (array_key_exists('search_dn', $value)) {
$this->_usedProperties['searchDn'] = true;
$this->searchDn = $value['search_dn'];
unset($value['search_dn']);
}
if (array_key_exists('search_password', $value)) {
$this->_usedProperties['searchPassword'] = true;
$this->searchPassword = $value['search_password'];
unset($value['search_password']);
}
if (array_key_exists('extra_fields', $value)) {
$this->_usedProperties['extraFields'] = true;
$this->extraFields = $value['extra_fields'];
unset($value['extra_fields']);
}
if (array_key_exists('default_roles', $value)) {
$this->_usedProperties['defaultRoles'] = true;
$this->defaultRoles = $value['default_roles'];
unset($value['default_roles']);
}
if (array_key_exists('role_fetcher', $value)) {
$this->_usedProperties['roleFetcher'] = true;
$this->roleFetcher = $value['role_fetcher'];
unset($value['role_fetcher']);
}
if (array_key_exists('uid_key', $value)) {
$this->_usedProperties['uidKey'] = true;
$this->uidKey = $value['uid_key'];
unset($value['uid_key']);
}
if (array_key_exists('filter', $value)) {
$this->_usedProperties['filter'] = true;
$this->filter = $value['filter'];
unset($value['filter']);
}
if (array_key_exists('password_attribute', $value)) {
$this->_usedProperties['passwordAttribute'] = true;
$this->passwordAttribute = $value['password_attribute'];
unset($value['password_attribute']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['baseDn'])) {
$output['base_dn'] = $this->baseDn;
}
if (isset($this->_usedProperties['searchDn'])) {
$output['search_dn'] = $this->searchDn;
}
if (isset($this->_usedProperties['searchPassword'])) {
$output['search_password'] = $this->searchPassword;
}
if (isset($this->_usedProperties['extraFields'])) {
$output['extra_fields'] = $this->extraFields;
}
if (isset($this->_usedProperties['defaultRoles'])) {
$output['default_roles'] = $this->defaultRoles;
}
if (isset($this->_usedProperties['roleFetcher'])) {
$output['role_fetcher'] = $this->roleFetcher;
}
if (isset($this->_usedProperties['uidKey'])) {
$output['uid_key'] = $this->uidKey;
}
if (isset($this->_usedProperties['filter'])) {
$output['filter'] = $this->filter;
}
if (isset($this->_usedProperties['passwordAttribute'])) {
$output['password_attribute'] = $this->passwordAttribute;
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Security\ProviderConfig\Memory;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class UserConfig
{
private $password;
private $roles;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function password($value): static
{
$this->_usedProperties['password'] = true;
$this->password = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|string $value
*
* @return $this
*/
public function roles(ParamConfigurator|string|array $value): static
{
$this->_usedProperties['roles'] = true;
$this->roles = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('password', $value)) {
$this->_usedProperties['password'] = true;
$this->password = $value['password'];
unset($value['password']);
}
if (array_key_exists('roles', $value)) {
$this->_usedProperties['roles'] = true;
$this->roles = $value['roles'];
unset($value['roles']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['password'])) {
$output['password'] = $this->password;
}
if (isset($this->_usedProperties['roles'])) {
$output['roles'] = $this->roles;
}
return $output;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace Symfony\Config\Security\ProviderConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Memory'.\DIRECTORY_SEPARATOR.'UserConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class MemoryConfig
{
private $users;
private $_usedProperties = [];
public function user(string $identifier, array $value = []): \Symfony\Config\Security\ProviderConfig\Memory\UserConfig
{
if (!isset($this->users[$identifier])) {
$this->_usedProperties['users'] = true;
$this->users[$identifier] = new \Symfony\Config\Security\ProviderConfig\Memory\UserConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "user()" has already been initialized. You cannot pass values the second time you call user().');
}
return $this->users[$identifier];
}
public function __construct(array $value = [])
{
if (array_key_exists('users', $value)) {
$this->_usedProperties['users'] = true;
$this->users = array_map(fn ($v) => new \Symfony\Config\Security\ProviderConfig\Memory\UserConfig($v), $value['users']);
unset($value['users']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['users'])) {
$output['users'] = array_map(fn ($v) => $v->toArray(), $this->users);
}
return $output;
}
}