Skip to content

Commit acd652d

Browse files
committed
Conflicts resolved
1 parent 8f6318c commit acd652d

22 files changed

+43
-412
lines changed

src/Bundle/DataCollector/JWECollector.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ private function collectSupportedJWEBuilders(array &$data): void
148148
$data['jwe']['jwe_builders'] = [];
149149
foreach ($this->jweBuilders as $id => $jweBuilder) {
150150
$data['jwe']['jwe_builders'][$id] = [
151-
'key_encryption_algorithms' => $jweBuilder->getKeyEncryptionAlgorithmManager()
152-
->list(),
153-
'content_encryption_algorithms' => $jweBuilder->getContentEncryptionAlgorithmManager()
151+
'encryption_algorithms' => $jweBuilder->getKeyEncryptionAlgorithmManager()
154152
->list(),
155153
];
156154
}
@@ -164,9 +162,7 @@ private function collectSupportedJWEDecrypters(array &$data): void
164162
$data['jwe']['jwe_decrypters'] = [];
165163
foreach ($this->jweDecrypters as $id => $jweDecrypter) {
166164
$data['jwe']['jwe_decrypters'][$id] = [
167-
'key_encryption_algorithms' => $jweDecrypter->getKeyEncryptionAlgorithmManager()
168-
->list(),
169-
'content_encryption_algorithms' => $jweDecrypter->getContentEncryptionAlgorithmManager()
165+
'encryption_algorithms' => $jweDecrypter->getKeyEncryptionAlgorithmManager()
170166
->list(),
171167
];
172168
}
@@ -182,12 +178,9 @@ private function collectSupportedJWELoaders(array &$data): void
182178
$data['jwe']['jwe_loaders'][$id] = [
183179
'serializers' => $jweLoader->getSerializerManager()
184180
->names(),
185-
'key_encryption_algorithms' => $jweLoader->getJweDecrypter()
181+
'encryption_algorithms' => $jweLoader->getJweDecrypter()
186182
->getKeyEncryptionAlgorithmManager()
187183
->list(),
188-
'content_encryption_algorithms' => $jweLoader->getJweDecrypter()
189-
->getContentEncryptionAlgorithmManager()
190-
->list(),
191184
];
192185
}
193186
}

src/Bundle/DependencyInjection/Source/Encryption/JWEBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function load(array $configs, ContainerBuilder $container): void
2727
$definition = new Definition(JWEBuilderService::class);
2828
$definition
2929
->setFactory([new Reference(JWEBuilderFactory::class), 'create'])
30-
->setArguments([$itemConfig['key_encryption_algorithms']])
30+
->setArguments([$itemConfig['encryption_algorithms']])
3131
->addTag('jose.jwe_builder')
3232
->setPublic($itemConfig['is_public']);
3333
foreach ($itemConfig['tags'] as $id => $attributes) {

src/Bundle/DependencyInjection/Source/Encryption/JWEDecrypter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function load(array $configs, ContainerBuilder $container): void
2727
$definition = new Definition(JWEDecrypterService::class);
2828
$definition
2929
->setFactory([new Reference(JWEDecrypterFactory::class), 'create'])
30-
->setArguments([$itemConfig['key_encryption_algorithms']])
30+
->setArguments([$itemConfig['encryption_algorithms']])
3131
->addTag('jose.jwe_decrypter')
3232
->setPublic($itemConfig['is_public']);
3333
foreach ($itemConfig['tags'] as $id => $attributes) {

src/Bundle/DependencyInjection/Source/Encryption/JWELoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function load(array $configs, ContainerBuilder $container): void
3131
->setFactory([new Reference(JWELoaderFactory::class), 'create'])
3232
->setArguments([
3333
$itemConfig['serializers'],
34-
$itemConfig['key_encryption_algorithms'],
34+
$itemConfig['encryption_algorithms'],
3535
$itemConfig['header_checkers'],
3636
])
3737
->addTag('jose.jwe_loader')

src/Bundle/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function load(array $configs, ContainerBuilder $container): void
3131
->setFactory([new Reference(NestedTokenBuilderFactory::class), 'create'])
3232
->setArguments([
3333
$itemConfig['jwe_serializers'],
34-
$itemConfig['key_encryption_algorithms'],
34+
$itemConfig['encryption_algorithms'],
3535
$itemConfig['jws_serializers'],
3636
$itemConfig['signature_algorithms'],
3737
])

src/Bundle/DependencyInjection/Source/NestedToken/NestedTokenLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function load(array $configs, ContainerBuilder $container): void
3131
->setFactory([new Reference(NestedTokenLoaderFactory::class), 'create'])
3232
->setArguments([
3333
$itemConfig['jwe_serializers'],
34-
$itemConfig['key_encryption_algorithms'],
34+
$itemConfig['encryption_algorithms'],
3535
$itemConfig['jwe_header_checkers'],
3636
$itemConfig['jws_serializers'],
3737
$itemConfig['signature_algorithms'],

tests/Bundle/JoseFramework/Functional/Encryption/JWELoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function theWELoaderFactoryCanCreateAJWELoader(): void
3333
$jweLoaderFactory = $container->get(JWELoaderFactoryAlias::class);
3434
static::assertInstanceOf(JWELoaderFactoryAlias::class, $jweLoaderFactory);
3535

36-
$jwe = $jweLoaderFactory->create(['jwe_compact'], ['RSA1_5'], ['A256GCM']);
36+
$jwe = $jweLoaderFactory->create(['jwe_compact'], ['RSA1_5', 'A256GCM']);
3737

3838
static::assertSame(['jwe_compact'], $jwe->getSerializerManager()->names());
3939
static::assertSame(['RSA1_5'], $jwe->getJweDecrypter()->getKeyEncryptionAlgorithmManager()->list());

tests/Bundle/JoseFramework/Functional/Encryption/JweBuilderConfigurationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function theConfigurationIsInvalidIfNotKeyEncryptionAlgorithmIsSet(): voi
6969
],
7070
],
7171
],
72-
'The child config "key_encryption_algorithms" under "jose.jwe.builders.foo" must be configured:'
72+
'The child config "encryption_algorithms" under "jose.jwe.builders.foo" must be configured:'
7373
);
7474
}
7575

@@ -82,13 +82,13 @@ public function theConfigurationIsInvalidIfTheKeyEncryptionAlgorithmIsEmpty(): v
8282
'jwe' => [
8383
'builders' => [
8484
'foo' => [
85-
'key_encryption_algorithms' => [],
85+
'encryption_algorithms' => [],
8686
],
8787
],
8888
],
8989
],
9090
],
91-
'The path "jose.jwe.builders.foo.key_encryption_algorithms" should have at least 1 element(s) defined.'
91+
'The path "jose.jwe.builders.foo.encryption_algorithms" should have at least 1 element(s) defined.'
9292
);
9393
}
9494

tests/Bundle/JoseFramework/Functional/Encryption/JweDecrypterConfigurationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function theConfigurationIsInvalidIfNotKeyEncryptionAlgorithmIsSet(): voi
6969
],
7070
],
7171
],
72-
'The child config "key_encryption_algorithms" under "jose.jwe.decrypters.foo" must be configured:'
72+
'The child config "encryption_algorithms" under "jose.jwe.decrypters.foo" must be configured:'
7373
);
7474
}
7575

@@ -82,13 +82,13 @@ public function theConfigurationIsInvalidIfTheKeyEncryptionAlgorithmIsEmpty(): v
8282
'jwe' => [
8383
'decrypters' => [
8484
'foo' => [
85-
'key_encryption_algorithms' => [],
85+
'encryption_algorithms' => [],
8686
],
8787
],
8888
],
8989
],
9090
],
91-
'The path "jose.jwe.decrypters.foo.key_encryption_algorithms" should have at least 1 element(s) defined.'
91+
'The path "jose.jwe.decrypters.foo.encryption_algorithms" should have at least 1 element(s) defined.'
9292
);
9393
}
9494

tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderConfigurationTest.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function theConfigurationIsInvalidIfNoKeyEncryptionAlgorithmIsSet(): void
9191
],
9292
],
9393
],
94-
'The child config "key_encryption_algorithms" under "jose.nested_token.builders.foo" must be configured:'
94+
'The child config "encryption_algorithms" under "jose.nested_token.builders.foo" must be configured:'
9595
);
9696
}
9797

@@ -105,8 +105,7 @@ public function theConfigurationIsInvalidIfNoJwsSerializerIsSet(): void
105105
'builders' => [
106106
'foo' => [
107107
'signature_algorithms' => ['RS256'],
108-
'key_encryption_algorithms' => ['RSA-OAEP'],
109-
'content_encryption_algorithms' => ['A128GCM'],
108+
'encryption_algorithms' => ['RSA-OAEP', 'A128GCM'],
110109
],
111110
],
112111
],
@@ -126,8 +125,7 @@ public function theConfigurationIsInvalidIfNoJweSerializerIsSet(): void
126125
'builders' => [
127126
'foo' => [
128127
'signature_algorithms' => ['RS256'],
129-
'key_encryption_algorithms' => ['RSA-OAEP'],
130-
'content_encryption_algorithms' => ['A128GCM'],
128+
'encryption_algorithms' => ['RSA-OAEP', 'A128GCM'],
131129
'jws_serializers' => ['jws_compact'],
132130
],
133131
],
@@ -148,8 +146,7 @@ public function theConfigurationIsValid(): void
148146
'builders' => [
149147
'foo' => [
150148
'signature_algorithms' => ['RS256'],
151-
'key_encryption_algorithms' => ['RSA-OAEP'],
152-
'content_encryption_algorithms' => ['A128GCM'],
149+
'encryption_algorithms' => ['RSA-OAEP', 'A128GCM'],
153150
'jws_serializers' => ['jws_compact'],
154151
'jwe_serializers' => ['jwe_compact'],
155152
],

0 commit comments

Comments
 (0)