Skip to content

Commit

Permalink
Fix CI 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky authored and chalasr committed Mar 24, 2024
1 parent d737b37 commit 60770f1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion Command/MigrateConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ private function getKeySize(string $algorithm): int
case 'HS512':
return 512;
default:
dump($algorithm);
throw new \LogicException('Unsupported algorithm');
}
}
Expand Down
6 changes: 3 additions & 3 deletions Resources/config/web_token_issuance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<argument type="service" id="Jose\Bundle\JoseFramework\Services\JWEBuilderFactory" on-invalid="null" />
<argument /> <!-- Signature algorithm -->
<argument /> <!-- Signature key -->
<argument on-invalid="null" /> <!-- Key encryption algorithm -->
<argument on-invalid="null" /> <!-- Content encryption algorithm -->
<argument on-invalid="null" /> <!-- Encryption key -->
<argument /> <!-- Key encryption algorithm -->
<argument /> <!-- Content encryption algorithm -->
<argument /> <!-- Encryption key -->
</service>
</services>
</container>
6 changes: 3 additions & 3 deletions Resources/config/web_token_verification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<argument type="collection" /> <!-- Allowed signature algorithms -->
<argument /> <!-- Signature keyset -->
<argument on-invalid="null" /> <!-- Continue on decryption failure -->
<argument type="collection" on-invalid="null" /> <!-- JWE header checkers -->
<argument type="collection" on-invalid="null" /> <!-- Allowed key encryption algorithms -->
<argument type="collection" on-invalid="null" /> <!-- Allowed content encryption algorithms -->
<argument type="collection" /> <!-- JWE header checkers -->
<argument type="collection" /> <!-- Allowed key encryption algorithms -->
<argument type="collection" /> <!-- Allowed content encryption algorithms -->
<argument on-invalid="null" /> <!-- Encryption keyset -->
</service>
<service id="lexik_jwt_authentication.web_token.iat_validator" class="Jose\Component\Checker\IssuedAtChecker" public="false">
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/10-web-token.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To enable this feature, you must install the following dependencies:

.. code-block:: sh
composer require --no-update web-token/jwt-bundle
composer require web-token/jwt-bundle
## About Algorithms

Expand Down
2 changes: 1 addition & 1 deletion Services/WebToken/AccessTokenBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct(
) {
$this->jwsBuilder = $jwsBuilderFactory->create([$signatureAlgorithm]);
if ($jweBuilderFactory !== null && $keyEncryptionAlgorithm !== null && $contentEncryptionAlgorithm !== null) {
$this->jweBuilder = $jweBuilderFactory->create([$keyEncryptionAlgorithm], [$contentEncryptionAlgorithm], []);
$this->jweBuilder = $jweBuilderFactory->create([$keyEncryptionAlgorithm, $contentEncryptionAlgorithm]);
}
$this->signatureKey = JWK::createFromJson($signatureKey);
$this->encryptionKey = $encryptionKey ? JWK::createFromJson($encryptionKey) : null;
Expand Down
2 changes: 1 addition & 1 deletion Services/WebToken/AccessTokenLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
) {
$this->jwsLoader = $jwsLoaderFactory->create(['jws_compact'], $signatureAlgorithms, $jwsHeaderChecker);
if ($jweLoaderFactory !== null && $keyEncryptionAlgorithms !== null && $contentEncryptionAlgorithms !== null && $jweHeaderChecker !== null) {
$this->jweLoader = $jweLoaderFactory->create(['jwe_compact'], $keyEncryptionAlgorithms, $contentEncryptionAlgorithms, [], $jweHeaderChecker);
$this->jweLoader = $jweLoaderFactory->create(['jwe_compact'], array_merge($keyEncryptionAlgorithms, $contentEncryptionAlgorithms), null, null, $jweHeaderChecker);
$this->continueOnDecryptionFailure = $continueOnDecryptionFailure;
}
$this->signatureKeyset = JWKSet::createFromJson($signatureKeyset);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AppKernel extends Kernel

private $testCase;

public function __construct($environment, $debug, $testCase = null)
public function __construct(string $environment, bool $debug, ?string $testCase = null)
{
parent::__construct($environment, $debug);

Expand Down
2 changes: 1 addition & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $config): void {
$config->sets([SetList::PSR_12, ]);
$config->sets([SetList::PSR_12]);
$config->rule(OrderedImportsFixer::class);
$config->ruleWithConfiguration(ArraySyntaxFixer::class, [
'syntax' => 'short',
Expand Down

0 comments on commit 60770f1

Please sign in to comment.