webundle/puzzle-connect
Composer 安装命令:
composer require webundle/puzzle-connect
包简介
Manages user security
关键字:
README 文档
README
=========================================
Puzzle bundle for managing basic and oauth authentication and also user accounts
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require webundle/puzzle-connect
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Puzzle\ConnectBundle\PuzzleConnectBundle(), ); // ... } // ... }
Step 3: Register the Routes
Load the bundle's routing definition in the application (usually in the app/config/routing.yml file):
app/config/routing.yml
puzzle_connect: resource: "@PuzzleConnectBundle/Resources/config/routing.yml"
Step 4: Configure Puzzle OAuth options
Then, enable management bundle via admin modules interface by adding it to the list of registered bundles in the app/config/config.yml file of your project under:
puzzle_connect: client_id: client_id_value client_secret: client_secret_value base_authorize_uri: 'http://account.puzzle.ci/oauth/v2/authorize' base_token_uri: 'http://account.puzzle.ci/oauth/v2/token' default_redirect_uri: oauth default_scope: 'user' host_apis: 'http://apis.puzzle.ci'
Step 5: Security
Then, configure security in the app/config/security.yml file of your project under:
security: encoders: ... Puzzle\ConnectBundle\Entity\User: algorithm: sha512 encode_as_base64: false iterations: 1 role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ROLE_ALLOWED_TO_SWITCH, ROLE_ADMIN] providers: ... connect_provider: id: puzzle_connect.provider.user firewalls: main: host: '%host_account%' pattern: '^/' entry_point: puzzle_connect.security.authentication.form_entry_point entry_point: null logout_on_user_change: true form_login: provider: connect_provider check_path: login_check login_path: login success_handler: puzzle_connect.handler.authentication_success username_parameter: _username password_parameter: _password csrf_parameter: _csrf_token csrf_token_id: authenticate post_only: true remember_me: true require_previous_session: true switch_user: provider: connect_provider parameter: _swu role: ROLE_ALLOWED_TO_SWITCH remember_me: secret: '%secret%' path: / domain: '%host_admin%' secure: false httponly: true lifetime: 31536000 remember_me_parameter: _remember_me logout: path: logout target: login invalidate_session: true delete_cookies: a: { path: /, domain: ~ } anonymous: true access_control: ... - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/oauth, roles: IS_AUTHENTICATED_ANONYMOUSLY, host: '%host_admin%' } - { path: ^/, roles: ROLE_ADMIN, host: '%host_admin%' }
webundle/puzzle-connect 适用场景与选型建议
webundle/puzzle-connect 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 09 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「puzzle user」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 webundle/puzzle-connect 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webundle/puzzle-connect 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 webundle/puzzle-connect 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP SDK for Puzzler Media REST API
Standalone replacement for php's native get_browser() function
User component for Yii2
Mozaic puzzle for symfony, can also be use in glynn-admin-symfony
User Approval Laravel Package
A minimal blog preset template for Jigsaw sites powered by Tailwind CSS
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2018-09-20