if (\
in_array('payment_method:read',
$privileges, true
)) { $builder->
withClaim('paymentMethodId',
$context->
getPaymentMethod()->
getId());
} if (\
in_array('shipping_method:read',
$privileges, true
)) { $builder->
withClaim('shippingMethodId',
$context->
getShippingMethod()->
getId());
} return new JsonResponse([ 'token' =>
$builder->
getToken($configuration->
signer(),
$configuration->
signingKey())->
toString(),
'expires' =>
$expiration->
format(\DateTime::ATOM
),
'shopId' =>
$shopId,
]);
} /**
* @return array{app_secret: non-empty-string, privileges: array<string>}
*/
private function fetchAppDetails(string
$name): array
{ /** @var array{app_secret: non-empty-string, privileges: string} $row */