The start of something beautiful

This commit is contained in:
2024-09-11 22:48:07 -06:00
parent 45acea47f3
commit f5997ee5ec
5614 changed files with 630696 additions and 0 deletions
@@ -0,0 +1,124 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance;
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 $keyEncryptionAlgorithm;
private $contentEncryptionAlgorithm;
private $key;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* The key encryption algorithm is used to encrypt the token.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function keyEncryptionAlgorithm($value): static
{
$this->_usedProperties['keyEncryptionAlgorithm'] = true;
$this->keyEncryptionAlgorithm = $value;
return $this;
}
/**
* The key encryption algorithm is used to encrypt the token.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function contentEncryptionAlgorithm($value): static
{
$this->_usedProperties['contentEncryptionAlgorithm'] = true;
$this->contentEncryptionAlgorithm = $value;
return $this;
}
/**
* The encryption key. It shall be JWK encoded.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function key($value): static
{
$this->_usedProperties['key'] = true;
$this->key = $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('key_encryption_algorithm', $value)) {
$this->_usedProperties['keyEncryptionAlgorithm'] = true;
$this->keyEncryptionAlgorithm = $value['key_encryption_algorithm'];
unset($value['key_encryption_algorithm']);
}
if (array_key_exists('content_encryption_algorithm', $value)) {
$this->_usedProperties['contentEncryptionAlgorithm'] = true;
$this->contentEncryptionAlgorithm = $value['content_encryption_algorithm'];
unset($value['content_encryption_algorithm']);
}
if (array_key_exists('key', $value)) {
$this->_usedProperties['key'] = true;
$this->key = $value['key'];
unset($value['key']);
}
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['keyEncryptionAlgorithm'])) {
$output['key_encryption_algorithm'] = $this->keyEncryptionAlgorithm;
}
if (isset($this->_usedProperties['contentEncryptionAlgorithm'])) {
$output['content_encryption_algorithm'] = $this->contentEncryptionAlgorithm;
}
if (isset($this->_usedProperties['key'])) {
$output['key'] = $this->key;
}
return $output;
}
}
@@ -0,0 +1,77 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance;
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 SignatureConfig
{
private $algorithm;
private $key;
private $_usedProperties = [];
/**
* The algorithm use to sign the access tokens.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function algorithm($value): static
{
$this->_usedProperties['algorithm'] = true;
$this->algorithm = $value;
return $this;
}
/**
* The signature key. It shall be JWK encoded.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function key($value): static
{
$this->_usedProperties['key'] = true;
$this->key = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('algorithm', $value)) {
$this->_usedProperties['algorithm'] = true;
$this->algorithm = $value['algorithm'];
unset($value['algorithm']);
}
if (array_key_exists('key', $value)) {
$this->_usedProperties['key'] = true;
$this->key = $value['key'];
unset($value['key']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['algorithm'])) {
$output['algorithm'] = $this->algorithm;
}
if (isset($this->_usedProperties['key'])) {
$output['key'] = $this->key;
}
return $output;
}
}
@@ -0,0 +1,113 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
require_once __DIR__.\DIRECTORY_SEPARATOR.'AccessTokenIssuance'.\DIRECTORY_SEPARATOR.'SignatureConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'AccessTokenIssuance'.\DIRECTORY_SEPARATOR.'EncryptionConfig.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 AccessTokenIssuanceConfig
{
private $enabled;
private $signature;
private $encryption;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
public function signature(array $value = []): \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\SignatureConfig
{
if (null === $this->signature) {
$this->_usedProperties['signature'] = true;
$this->signature = new \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\SignatureConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "signature()" has already been initialized. You cannot pass values the second time you call signature().');
}
return $this->signature;
}
/**
* @template TValue
* @param TValue $value
* @default {"enabled":false}
* @return \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\EncryptionConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\EncryptionConfig : static)
*/
public function encryption(array $value = []): \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\EncryptionConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['encryption'] = true;
$this->encryption = $value;
return $this;
}
if (!$this->encryption instanceof \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\EncryptionConfig) {
$this->_usedProperties['encryption'] = true;
$this->encryption = new \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\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('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('signature', $value)) {
$this->_usedProperties['signature'] = true;
$this->signature = new \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\SignatureConfig($value['signature']);
unset($value['signature']);
}
if (array_key_exists('encryption', $value)) {
$this->_usedProperties['encryption'] = true;
$this->encryption = \is_array($value['encryption']) ? new \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\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['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['signature'])) {
$output['signature'] = $this->signature->toArray();
}
if (isset($this->_usedProperties['encryption'])) {
$output['encryption'] = $this->encryption instanceof \Symfony\Config\LexikJwtAuthentication\AccessTokenIssuance\EncryptionConfig ? $this->encryption->toArray() : $this->encryption;
}
return $output;
}
}
@@ -0,0 +1,169 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\AccessTokenVerification;
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 $continueOnDecryptionFailure;
private $headerCheckers;
private $allowedKeyEncryptionAlgorithms;
private $allowedContentEncryptionAlgorithms;
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;
}
/**
* If enable, non-encrypted tokens or tokens that failed during decryption or verification processes are accepted.
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function continueOnDecryptionFailure($value): static
{
$this->_usedProperties['continueOnDecryptionFailure'] = true;
$this->continueOnDecryptionFailure = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function headerCheckers(ParamConfigurator|array $value): static
{
$this->_usedProperties['headerCheckers'] = true;
$this->headerCheckers = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function allowedKeyEncryptionAlgorithms(ParamConfigurator|array $value): static
{
$this->_usedProperties['allowedKeyEncryptionAlgorithms'] = true;
$this->allowedKeyEncryptionAlgorithms = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function allowedContentEncryptionAlgorithms(ParamConfigurator|array $value): static
{
$this->_usedProperties['allowedContentEncryptionAlgorithms'] = true;
$this->allowedContentEncryptionAlgorithms = $value;
return $this;
}
/**
* The encryption keyset. It shall be JWKSet encoded.
* @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('continue_on_decryption_failure', $value)) {
$this->_usedProperties['continueOnDecryptionFailure'] = true;
$this->continueOnDecryptionFailure = $value['continue_on_decryption_failure'];
unset($value['continue_on_decryption_failure']);
}
if (array_key_exists('header_checkers', $value)) {
$this->_usedProperties['headerCheckers'] = true;
$this->headerCheckers = $value['header_checkers'];
unset($value['header_checkers']);
}
if (array_key_exists('allowed_key_encryption_algorithms', $value)) {
$this->_usedProperties['allowedKeyEncryptionAlgorithms'] = true;
$this->allowedKeyEncryptionAlgorithms = $value['allowed_key_encryption_algorithms'];
unset($value['allowed_key_encryption_algorithms']);
}
if (array_key_exists('allowed_content_encryption_algorithms', $value)) {
$this->_usedProperties['allowedContentEncryptionAlgorithms'] = true;
$this->allowedContentEncryptionAlgorithms = $value['allowed_content_encryption_algorithms'];
unset($value['allowed_content_encryption_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['continueOnDecryptionFailure'])) {
$output['continue_on_decryption_failure'] = $this->continueOnDecryptionFailure;
}
if (isset($this->_usedProperties['headerCheckers'])) {
$output['header_checkers'] = $this->headerCheckers;
}
if (isset($this->_usedProperties['allowedKeyEncryptionAlgorithms'])) {
$output['allowed_key_encryption_algorithms'] = $this->allowedKeyEncryptionAlgorithms;
}
if (isset($this->_usedProperties['allowedContentEncryptionAlgorithms'])) {
$output['allowed_content_encryption_algorithms'] = $this->allowedContentEncryptionAlgorithms;
}
if (isset($this->_usedProperties['keyset'])) {
$output['keyset'] = $this->keyset;
}
return $output;
}
}
@@ -0,0 +1,145 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\AccessTokenVerification;
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 SignatureConfig
{
private $headerCheckers;
private $claimCheckers;
private $mandatoryClaims;
private $allowedAlgorithms;
private $keyset;
private $_usedProperties = [];
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function headerCheckers(ParamConfigurator|array $value): static
{
$this->_usedProperties['headerCheckers'] = true;
$this->headerCheckers = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function claimCheckers(ParamConfigurator|array $value): static
{
$this->_usedProperties['claimCheckers'] = true;
$this->claimCheckers = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function mandatoryClaims(ParamConfigurator|array $value): static
{
$this->_usedProperties['mandatoryClaims'] = true;
$this->mandatoryClaims = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function allowedAlgorithms(ParamConfigurator|array $value): static
{
$this->_usedProperties['allowedAlgorithms'] = true;
$this->allowedAlgorithms = $value;
return $this;
}
/**
* The signature keyset. It shall be JWKSet encoded.
* @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('header_checkers', $value)) {
$this->_usedProperties['headerCheckers'] = true;
$this->headerCheckers = $value['header_checkers'];
unset($value['header_checkers']);
}
if (array_key_exists('claim_checkers', $value)) {
$this->_usedProperties['claimCheckers'] = true;
$this->claimCheckers = $value['claim_checkers'];
unset($value['claim_checkers']);
}
if (array_key_exists('mandatory_claims', $value)) {
$this->_usedProperties['mandatoryClaims'] = true;
$this->mandatoryClaims = $value['mandatory_claims'];
unset($value['mandatory_claims']);
}
if (array_key_exists('allowed_algorithms', $value)) {
$this->_usedProperties['allowedAlgorithms'] = true;
$this->allowedAlgorithms = $value['allowed_algorithms'];
unset($value['allowed_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['headerCheckers'])) {
$output['header_checkers'] = $this->headerCheckers;
}
if (isset($this->_usedProperties['claimCheckers'])) {
$output['claim_checkers'] = $this->claimCheckers;
}
if (isset($this->_usedProperties['mandatoryClaims'])) {
$output['mandatory_claims'] = $this->mandatoryClaims;
}
if (isset($this->_usedProperties['allowedAlgorithms'])) {
$output['allowed_algorithms'] = $this->allowedAlgorithms;
}
if (isset($this->_usedProperties['keyset'])) {
$output['keyset'] = $this->keyset;
}
return $output;
}
}
@@ -0,0 +1,116 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
require_once __DIR__.\DIRECTORY_SEPARATOR.'AccessTokenVerification'.\DIRECTORY_SEPARATOR.'SignatureConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'AccessTokenVerification'.\DIRECTORY_SEPARATOR.'EncryptionConfig.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 AccessTokenVerificationConfig
{
private $enabled;
private $signature;
private $encryption;
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 {"header_checkers":[],"claim_checkers":["exp_with_clock_skew","iat_with_clock_skew","nbf_with_clock_skew"],"mandatory_claims":[],"allowed_algorithms":[]}
*/
public function signature(array $value = []): \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\SignatureConfig
{
if (null === $this->signature) {
$this->_usedProperties['signature'] = true;
$this->signature = new \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\SignatureConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "signature()" has already been initialized. You cannot pass values the second time you call signature().');
}
return $this->signature;
}
/**
* @template TValue
* @param TValue $value
* @default {"enabled":false,"continue_on_decryption_failure":false,"header_checkers":["iat_with_clock_skew","nbf_with_clock_skew","exp_with_clock_skew"],"allowed_key_encryption_algorithms":[],"allowed_content_encryption_algorithms":[]}
* @return \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\EncryptionConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\EncryptionConfig : static)
*/
public function encryption(array $value = []): \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\EncryptionConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['encryption'] = true;
$this->encryption = $value;
return $this;
}
if (!$this->encryption instanceof \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\EncryptionConfig) {
$this->_usedProperties['encryption'] = true;
$this->encryption = new \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\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('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('signature', $value)) {
$this->_usedProperties['signature'] = true;
$this->signature = new \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\SignatureConfig($value['signature']);
unset($value['signature']);
}
if (array_key_exists('encryption', $value)) {
$this->_usedProperties['encryption'] = true;
$this->encryption = \is_array($value['encryption']) ? new \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\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['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['signature'])) {
$output['signature'] = $this->signature->toArray();
}
if (isset($this->_usedProperties['encryption'])) {
$output['encryption'] = $this->encryption instanceof \Symfony\Config\LexikJwtAuthentication\AccessTokenVerification\EncryptionConfig ? $this->encryption->toArray() : $this->encryption;
}
return $output;
}
}
@@ -0,0 +1,124 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
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 ApiPlatformConfig
{
private $enabled;
private $checkPath;
private $usernamePath;
private $passwordPath;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* The login check path to add in OpenAPI.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function checkPath($value): static
{
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value;
return $this;
}
/**
* The path to the username in the JSON body.
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function usernamePath($value): static
{
$this->_usedProperties['usernamePath'] = true;
$this->usernamePath = $value;
return $this;
}
/**
* The path to the password in the JSON body.
* @default null
* @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('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('check_path', $value)) {
$this->_usedProperties['checkPath'] = true;
$this->checkPath = $value['check_path'];
unset($value['check_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['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['checkPath'])) {
$output['check_path'] = $this->checkPath;
}
if (isset($this->_usedProperties['usernamePath'])) {
$output['username_path'] = $this->usernamePath;
}
if (isset($this->_usedProperties['passwordPath'])) {
$output['password_path'] = $this->passwordPath;
}
return $output;
}
}
@@ -0,0 +1,76 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
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 BlocklistTokenConfig
{
private $enabled;
private $cache;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* Storage to track blocked tokens
* @default 'cache.app'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function cache($value): static
{
$this->_usedProperties['cache'] = true;
$this->cache = $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('cache', $value)) {
$this->_usedProperties['cache'] = true;
$this->cache = $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['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['cache'])) {
$output['cache'] = $this->cache;
}
return $output;
}
}
@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
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 EncoderConfig
{
private $service;
private $signatureAlgorithm;
private $_usedProperties = [];
/**
* @default 'lexik_jwt_authentication.encoder.lcobucci'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default 'RS256'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function signatureAlgorithm($value): static
{
$this->_usedProperties['signatureAlgorithm'] = true;
$this->signatureAlgorithm = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('signature_algorithm', $value)) {
$this->_usedProperties['signatureAlgorithm'] = true;
$this->signatureAlgorithm = $value['signature_algorithm'];
unset($value['signature_algorithm']);
}
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['signatureAlgorithm'])) {
$output['signature_algorithm'] = $this->signatureAlgorithm;
}
return $output;
}
}
@@ -0,0 +1,214 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
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 SetCookiesConfig
{
private $lifetime;
private $samesite;
private $path;
private $domain;
private $secure;
private $httpOnly;
private $partitioned;
private $split;
private $_usedProperties = [];
/**
* The cookie lifetime. If null, the "token_ttl" option value will be used
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function lifetime($value): static
{
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value;
return $this;
}
/**
* @default 'lax'
* @param ParamConfigurator|'none'|'lax'|'strict' $value
* @return $this
*/
public function samesite($value): static
{
$this->_usedProperties['samesite'] = true;
$this->samesite = $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 true
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function secure($value): static
{
$this->_usedProperties['secure'] = true;
$this->secure = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function httpOnly($value): static
{
$this->_usedProperties['httpOnly'] = true;
$this->httpOnly = $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;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function split(ParamConfigurator|array $value): static
{
$this->_usedProperties['split'] = true;
$this->split = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('lifetime', $value)) {
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value['lifetime'];
unset($value['lifetime']);
}
if (array_key_exists('samesite', $value)) {
$this->_usedProperties['samesite'] = true;
$this->samesite = $value['samesite'];
unset($value['samesite']);
}
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('partitioned', $value)) {
$this->_usedProperties['partitioned'] = true;
$this->partitioned = $value['partitioned'];
unset($value['partitioned']);
}
if (array_key_exists('split', $value)) {
$this->_usedProperties['split'] = true;
$this->split = $value['split'];
unset($value['split']);
}
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['lifetime'])) {
$output['lifetime'] = $this->lifetime;
}
if (isset($this->_usedProperties['samesite'])) {
$output['samesite'] = $this->samesite;
}
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['partitioned'])) {
$output['partitioned'] = $this->partitioned;
}
if (isset($this->_usedProperties['split'])) {
$output['split'] = $this->split;
}
return $output;
}
}
@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\TokenExtractors;
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 AuthorizationHeaderConfig
{
private $enabled;
private $prefix;
private $name;
private $_usedProperties = [];
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @default 'Bearer'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function prefix($value): static
{
$this->_usedProperties['prefix'] = true;
$this->prefix = $value;
return $this;
}
/**
* @default 'Authorization'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function name($value): static
{
$this->_usedProperties['name'] = true;
$this->name = $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('prefix', $value)) {
$this->_usedProperties['prefix'] = true;
$this->prefix = $value['prefix'];
unset($value['prefix']);
}
if (array_key_exists('name', $value)) {
$this->_usedProperties['name'] = true;
$this->name = $value['name'];
unset($value['name']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['prefix'])) {
$output['prefix'] = $this->prefix;
}
if (isset($this->_usedProperties['name'])) {
$output['name'] = $this->name;
}
return $output;
}
}
@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\TokenExtractors;
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 CookieConfig
{
private $enabled;
private $name;
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 'BEARER'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function name($value): static
{
$this->_usedProperties['name'] = true;
$this->name = $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('name', $value)) {
$this->_usedProperties['name'] = true;
$this->name = $value['name'];
unset($value['name']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['name'])) {
$output['name'] = $this->name;
}
return $output;
}
}
@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\TokenExtractors;
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 QueryParameterConfig
{
private $enabled;
private $name;
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 'bearer'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function name($value): static
{
$this->_usedProperties['name'] = true;
$this->name = $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('name', $value)) {
$this->_usedProperties['name'] = true;
$this->name = $value['name'];
unset($value['name']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['name'])) {
$output['name'] = $this->name;
}
return $output;
}
}
@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication\TokenExtractors;
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 SplitCookieConfig
{
private $enabled;
private $cookies;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function cookies(ParamConfigurator|array $value): static
{
$this->_usedProperties['cookies'] = true;
$this->cookies = $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('cookies', $value)) {
$this->_usedProperties['cookies'] = true;
$this->cookies = $value['cookies'];
unset($value['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['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['cookies'])) {
$output['cookies'] = $this->cookies;
}
return $output;
}
}
@@ -0,0 +1,166 @@
<?php
namespace Symfony\Config\LexikJwtAuthentication;
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenExtractors'.\DIRECTORY_SEPARATOR.'AuthorizationHeaderConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenExtractors'.\DIRECTORY_SEPARATOR.'CookieConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenExtractors'.\DIRECTORY_SEPARATOR.'QueryParameterConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'TokenExtractors'.\DIRECTORY_SEPARATOR.'SplitCookieConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class TokenExtractorsConfig
{
private $authorizationHeader;
private $cookie;
private $queryParameter;
private $splitCookie;
private $_usedProperties = [];
/**
* @default {"enabled":true,"prefix":"Bearer","name":"Authorization"}
*/
public function authorizationHeader(array $value = []): \Symfony\Config\LexikJwtAuthentication\TokenExtractors\AuthorizationHeaderConfig
{
if (null === $this->authorizationHeader) {
$this->_usedProperties['authorizationHeader'] = true;
$this->authorizationHeader = new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\AuthorizationHeaderConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "authorizationHeader()" has already been initialized. You cannot pass values the second time you call authorizationHeader().');
}
return $this->authorizationHeader;
}
/**
* @template TValue
* @param TValue $value
* @default {"enabled":false,"name":"BEARER"}
* @return \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig : static)
*/
public function cookie(array $value = []): \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['cookie'] = true;
$this->cookie = $value;
return $this;
}
if (!$this->cookie instanceof \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig) {
$this->_usedProperties['cookie'] = true;
$this->cookie = new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "cookie()" has already been initialized. You cannot pass values the second time you call cookie().');
}
return $this->cookie;
}
/**
* @template TValue
* @param TValue $value
* @default {"enabled":false,"name":"bearer"}
* @return \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig : static)
*/
public function queryParameter(array $value = []): \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['queryParameter'] = true;
$this->queryParameter = $value;
return $this;
}
if (!$this->queryParameter instanceof \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig) {
$this->_usedProperties['queryParameter'] = true;
$this->queryParameter = new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "queryParameter()" has already been initialized. You cannot pass values the second time you call queryParameter().');
}
return $this->queryParameter;
}
/**
* @template TValue
* @param TValue $value
* @default {"enabled":false,"cookies":[]}
* @return \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig : static)
*/
public function splitCookie(array $value = []): \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['splitCookie'] = true;
$this->splitCookie = $value;
return $this;
}
if (!$this->splitCookie instanceof \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig) {
$this->_usedProperties['splitCookie'] = true;
$this->splitCookie = new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "splitCookie()" has already been initialized. You cannot pass values the second time you call splitCookie().');
}
return $this->splitCookie;
}
public function __construct(array $value = [])
{
if (array_key_exists('authorization_header', $value)) {
$this->_usedProperties['authorizationHeader'] = true;
$this->authorizationHeader = new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\AuthorizationHeaderConfig($value['authorization_header']);
unset($value['authorization_header']);
}
if (array_key_exists('cookie', $value)) {
$this->_usedProperties['cookie'] = true;
$this->cookie = \is_array($value['cookie']) ? new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig($value['cookie']) : $value['cookie'];
unset($value['cookie']);
}
if (array_key_exists('query_parameter', $value)) {
$this->_usedProperties['queryParameter'] = true;
$this->queryParameter = \is_array($value['query_parameter']) ? new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig($value['query_parameter']) : $value['query_parameter'];
unset($value['query_parameter']);
}
if (array_key_exists('split_cookie', $value)) {
$this->_usedProperties['splitCookie'] = true;
$this->splitCookie = \is_array($value['split_cookie']) ? new \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig($value['split_cookie']) : $value['split_cookie'];
unset($value['split_cookie']);
}
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['authorizationHeader'])) {
$output['authorization_header'] = $this->authorizationHeader->toArray();
}
if (isset($this->_usedProperties['cookie'])) {
$output['cookie'] = $this->cookie instanceof \Symfony\Config\LexikJwtAuthentication\TokenExtractors\CookieConfig ? $this->cookie->toArray() : $this->cookie;
}
if (isset($this->_usedProperties['queryParameter'])) {
$output['query_parameter'] = $this->queryParameter instanceof \Symfony\Config\LexikJwtAuthentication\TokenExtractors\QueryParameterConfig ? $this->queryParameter->toArray() : $this->queryParameter;
}
if (isset($this->_usedProperties['splitCookie'])) {
$output['split_cookie'] = $this->splitCookie instanceof \Symfony\Config\LexikJwtAuthentication\TokenExtractors\SplitCookieConfig ? $this->splitCookie->toArray() : $this->splitCookie;
}
return $output;
}
}