ubl/vufind-auth
Composer 安装命令:
composer require ubl/vufind-auth
包简介
Authenticates users based on authenticated vufind session
README 文档
README
This extension enables typo3 to use vufind for frontend user authentication. After logging in into the catalog this extension reads the session-cookie and retrieves all necessary information from the vufind-database to identify an authorized user, assuming the requirements are met.
Requirements
- vufind >= v2
- typo3 >= 8.0.0
- zendframework/zendstdlib >= 3.1
- vufind-database is mysql
- vufind-session is stored into database
- typo3-installation has access to vufind-database
- a shared cookie-domain
Preparing Typo3
In order for this extension to work we need the zendframework/zend-stdlib classes available. therefore we require an autoloader, that loads this classes for us at
<PATH_site>/Packages/Libraries/autoload.php
Most simply way to provide this is by installing the packages with composer e.g.
COMPOSER_VENDOR_DIR="Packages/Libraries" composer require zendframework/zend-stdlib
Be aware that you have to manually adjust the vendor-dir within the composer.json in order to keep the folder for further installations. if you have a composer-enabled typo3-installation you probably might be fine with the defaults.
Preparing VuFind
At first be aware that your Typo3 host has an access to the VuFind database. Therefor we prefer an own user with restricted rules to the VuFind tables session and user.
Database as Session Storage
VuFind has a simple option to store the session-data into its own database.
therefore one has to set the option type on 'Database' in section Session at config.ini and keep the session unencrypted.
[Session] type = Database secure = false
Cookie Domain
In order to enable Typo3 to read the vufind-cookie we have to set the cookie-domain
to the shared domain value. This is done by the option domain in the Cookies section:
[Cookies] domain = ".example.edu"
Configuring the extension
It is necessary to configure tx-vufind-auth at the extension manager.
Storage
- pid = 1: this is the typo3-pag-id where the frontend users and groups are stored
Database
- host = localhost: the host where vufinds database-server is running
- port = 3306: the port where vufinds database-server is running
- name = vufind: the vufind database name
- user = vufind: the user to connect with to the vufind database
- pass: the vufind database-user's password
Session
- cookiename = PHPSESSID: the name of the vufind session cookie
- lifetime = 3600: the session lifetime (see vufind config.ini, section
Session, optionlifetime)
Command line tools
Cleanup users
There is a cleanup-command on typo3's commandline interface to remove outdated user data from fe_users table.
Be aware that the concept of saving users at fe_users for VuFind only depends on needs of other extensions at Typo3. Therefore calculate well between requirements of applications and data economy due to risk holding trusted personal data.
Parameters:
--days int (Default: 60) Amount of days to keep the record of a user since last login.
Instruction for setting up at backend
Go to Scheduler->Add Task
- At Class choose Extbase-CommandController-Task
- At Frequency specify how often and in which period scheduler task should be run. (Seconds or cronjob settings required.)
- At select box of CommandController Command choose VuFindAuth Cleanup: cleanupFrontendUser
- On next step save the task! This is important to display the form element for additional arguments of command line tool.
- Scroll down and specify the amount of days to keep the record since last login of user. Default are 60 days.
- Save the task again!
For developing issue it is also possible to run the task on a terminal.
ubl/vufind-auth 适用场景与选型建议
ubl/vufind-auth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 06 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Authentication」 「TYPO3 CMS」 「vufind」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ubl/vufind-auth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ubl/vufind-auth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ubl/vufind-auth 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-06-15