aligent / magento2-introspection-auth
限制只允许授权用户执行 GraphQL 查询的 introspection
1.1.0
2024-07-04 04:56 UTC
Requires
- php: ~8.1.0|~8.2.0|~8.3.0
- magento/framework: *
This package is auto-updated.
Last update: 2024-09-04 05:19:44 UTC
README
用于处理 GraphQL 查询授权的 Magento 2 模块。
功能
在 Magento 2 中,可以全局启用/禁用 GraphQL introspection。此模块添加了功能,以便在启用时,只有授权用户才能执行 introspection 查询。
安装
- 通过 composer 安装包
composer require aligent/magento2-introspection-auth
- 启用模块
bin/magento module:enable Aligent_IntrospectionAuth
- 运行
setup:upgrade
命令
bin/magento setup:upgrade
配置
可以通过 商店 -> 配置 -> 高级 -> 系统 -> 安全 -> 启用 Introspection Authorisation
启用/禁用授权功能。注意,只有在启用 GraphQL introspection 的情况下,授权才会生效。如果禁用,则无论授权如何,都会对所有用户禁用。
权限
为了获得授权,用户/集成将需要 Aligent_Introspection::introspection_allowed
权限