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,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;
}
}