authentication - CakePHP 4 手动登录用户
问题描述
我正在尝试手动登录用户。
以前这是通过调用完成的$this->Auth->login()
我找不到使用身份验证插件的方法。
解决方案
$this->Authentication->setIdentity($this->request->getData());
推荐阅读
- python - 在大型熊猫数据框中存储大量 NaN 值是否会极大地影响性能和内存使用?
- node.js - Yarn Berry - 直接运行节点脚本
- reactjs - 如何在 for 循环中更快地请求 api?
- c# - 如何避免对对象重新分配内存
- c - 我可以在没有空闲的情况下不断地 malloc 内存吗?
- ruby - .rvm/gems/ruby-2.6.5/gems/puma-4.3.3/lib/puma/binder.rb:328:in `listen': 地址已经在使用中-listen(2) (Errno::EADDRINUSE)
- azure-devops - 当我推送整个解决方案的存储库时,是否可以只部署更新的 Azure 功能项目?
- scala - 无法解析来自Json 的重载方法
- teamcity - 在 TeamCity 中触发 A 作业后自动触发 B 作业
- java - 匹配整个列表及其部分的正则表达式