use Symfony\Component\Routing\Annotation\Route;
#[Route(defaults: ['_routeScope' => ['api']])]
#[Package('system-settings')]
class AccessKeyController extends AbstractController
{ #[Route(path: '/api/_action/access-key/intergration', name: 'api.action.access-key.integration', methods: ['GET'], defaults: ['_acl' => ['api_action_access-key_integration']])]
public function generateIntegrationKey(): JsonResponse
{ return new JsonResponse([ 'accessKey' => AccessKeyHelper::
generateAccessKey('integration'
),
'secretAccessKey' => AccessKeyHelper::
generateSecretAccessKey(),
]);
} #[Route(path: '/api/_action/access-key/user', name: 'api.action.access-key.user', methods: ['GET'])]
public function generateUserKey(): JsonResponse
{ return new JsonResponse([ 'accessKey' => AccessKeyHelper::
generateAccessKey('user'
),
'secretAccessKey' => AccessKeyHelper::
generateSecretAccessKey(),
]);
}