#[Package('checkout')]
class JWTConfigurationFactoryTest extends TestCase
{ use IntegrationTestBehaviour;
public function testWithFile(): void
{ $signer =
$this->
getContainer()->
get('shopware.jwt_signer'
);
$privateKey =
$this->
getContainer()->
get('shopware.private_key'
);
$publicKey =
$this->
getContainer()->
get('shopware.public_key'
);
$result = JWTConfigurationFactory::
createJWTConfiguration($signer,
$privateKey,
$publicKey);
static::
assertSame($signer,
$result->
signer());
} public function testWithInMemoryKey(): void
{ $signer =
$this->
getContainer()->
get('shopware.jwt_signer'
);
$privateKey =
$this->
getContainer()->
get('shopware.private_key'
);
$publicKey =
$this->
getContainer()->
get('shopware.public_key'
);
$inMemoryPrivateKey =
new CryptKey($privateKey->
getKeyContents(),
$privateKey->
getPassPhrase());
$inMemoryPublicKey =
new CryptKey($publicKey->
getKeyContents());