intracto/fas-open-id-bundle
Composer 安装命令:
composer require intracto/fas-open-id-bundle
包简介
Bundle that makes it easy to authenticate using Fas Open Id
README 文档
README
With this bundle, users of your application will be able to login into the application using FAS (Federal Authentication Service) using OpenId.
Installation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
$ composer require intracto/fas-open-id-bundle
Applications that don't use Symfony Flex
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 intracto/fas-open-id-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php file of your project:
// config/bundles.php return [ // ... Intracto\FasOpenIdBundle\IntractoFasOpenIdBundle::class => ['all' => true], ];
Step 3: register bundle routing
Load the bundle's routing inside your application
intracto_fas_open_id: resource: "@IntractoFasOpenIdBundle/Resources/config/routing.xml"
Step 4: Configuration
Bundle configuration
(If not done by Flex, create a intracto_fas_open_id.yaml file in your config/packages folder).
Config parameters needed to get this bundle working:
client_id: the client ID of your registered applicationclient_secret: the client secret of your registerd applicationscope: list of scopes that will be used by this application. Possible values are profile, egovnrn, certificateInfo, citizen, enterprise and roles. The role openid will automatically be usedauth_path: the route name where theFasOpenIdAuthenticatorwill check to authenticate the user. The default value for this parameter isintracto_fas_open_id.authtarget_path: the route name where the user will be redirected to on successful authenticationlogin_path: the route name where the user will be redirected to when he has to loginuser_class: FQN of your user class, this is optional. Make sure your user extends the User class of this bundle
Firewall configuration
Then, you have to tell the firewall(s) of your application which authentictor should be used. Under the guard parameter of your firewall(s), you have to append the intracto.fas_open_id.authenticator to the authenticators parameter.
security: providers: intracto_fas_open_id_user_provider: id: intracto.fas_open_id.user_provider ... my_firewall: ... guard: ... authenticators: - intracto.fas_open_id.authenticator provider: intracto_fas_open_id_user_provider
If you want to log out from FAS, add the intracto.fas_open_id.logout_handler to your firewall logout handlers.
intracto/fas-open-id-bundle 适用场景与选型建议
intracto/fas-open-id-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.86k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 08 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 intracto/fas-open-id-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 intracto/fas-open-id-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-26