cors / document-auth
CORS - 文档认证
0.2.2
2024-06-11 14:52 UTC
Requires
- php: >=8.0
- pimcore/pimcore: ^10.0 || ^11.0
Requires (Dev)
README
此包允许在Pimcore文档上基于属性添加基本认证。
简单使用这些属性
- password_enabled 复选框:启用和禁用密码
- password_username 文本:用户名
- password_password 文本:密码(原始文本)
安装
- 安装包
composer require cors/document-auth
- 启用包
bin/console pimcore:bundle:enable CORSDocumentAuthBundle
- 将安全配置复制到安全配置中
安全配置
security: enable_authenticator_manager: true password_hashers: Symfony\Component\Security\Core\User\InMemoryUser: 'auto' providers: document_auth_provider: id: CORS\Bundle\DocumentAuthBundle\Security\UserProvider firewalls: document_auth: request_matcher: CORS\Bundle\DocumentAuthBundle\Security\RequestMatcher http_basic: realm: Site provider: document_auth_provider access_control: - { path: ^/, role: ROLE_USER, attributes: {'_firewall_context': 'document_auth'}}