Skip to content

Commit 4fb151c

Browse files
author
ogorkun
committed
MC-38539: Introduce JWT wrapper
1 parent ea92f9b commit 4fb151c

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

app/code/Magento/JwtFrameworkAdapter/Model/JweCompressionManagerFactory.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@
99
namespace Magento\JwtFrameworkAdapter\Model;
1010

1111
use Jose\Component\Encryption\Compression\CompressionMethodManager;
12+
use Jose\Component\Encryption\Compression\Deflate;
1213

1314
class JweCompressionManagerFactory
1415
{
15-
/**
16-
* @var \Jose\Component\Encryption\Compression\CompressionMethod[]
17-
*/
18-
private $methods;
19-
20-
/**
21-
* @param \Jose\Component\Encryption\Compression\CompressionMethod[] $methods
22-
*/
23-
public function __construct(array $methods)
24-
{
25-
$this->methods = $methods;
26-
}
27-
2816
public function create(): CompressionMethodManager
2917
{
30-
return new CompressionMethodManager($this->methods);
18+
return new CompressionMethodManager([new Deflate()]);
3119
}
3220
}

app/code/Magento/JwtFrameworkAdapter/etc/di.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
99
<preference for="Magento\Framework\Jwt\JwtManagerInterface" type="Magento\JwtFrameworkAdapter\Model\JwtManager" />
10-
<type name="Magento\JwtFrameworkAdapter\Model\JweCompressionManagerFactory">
11-
<arguments>
12-
<argument name="methods" xsi:type="array">
13-
<item name="deflate" xsi:type="object">Jose\Component\Encryption\Compression\Deflate</item>
14-
</argument>
15-
</arguments>
16-
</type>
1710
</config>

0 commit comments

Comments
 (0)