public function __construct( private readonly string
$shopUrl,
private readonly string
$shopwareVersion,
private readonly LocaleProvider
$localeProvider,
private readonly ShopIdProvider
$shopIdProvider ) { } public function signUri(string
$uri, string
$secret, Context
$context): UriInterface
{ $uri = Uri::
withQueryValues(new Uri($uri),
[ 'shop-id' =>
$this->shopIdProvider->
getShopId(),
'shop-url' =>
$this->shopUrl,
'timestamp' =>
(string) (new \
DateTime())->
getTimestamp(),
'sw-version' =>
$this->shopwareVersion,
AuthMiddleware::SHOPWARE_CONTEXT_LANGUAGE =>
$context->
getLanguageId(),
AuthMiddleware::SHOPWARE_USER_LANGUAGE =>
$this->localeProvider->
getLocaleFromContext($context),
]);
return Uri::
withQueryValue( $uri,
'shopware-shop-signature',
(