[英]PHP Lithium - Authentication how to access session data
I have read about authentication in Lithium manual, still I have some questions about it. 我已经在Lithium手册中阅读了有关身份验证的信息,但仍然有一些疑问。 After Auth::check ('default', $this->request)
, it will return an array of user data if succeed. 在Auth::check ('default', $this->request)
,如果成功,它将返回一个用户数据数组。 I have finished this part according to the manual. 我已经按照手册完成了这一部分。
Thanks. 谢谢。
This should give you something to go on regarding encrypting session data - http://nitschinger.at/Session-Encryption-with-Lithium . 这应该使您可以继续进行有关加密会话数据的操作-http://nitschinger.at/Session-Encryption-with-Lithium 。
As far as telling Auth::check()
which fields to save to the session: 据告诉Auth::check()
哪些字段保存到会话中:
Auth::config(array(
'default' => array(
'session' => array(
'persist' => array('username', 'email')
)
)
));
This is in the latest master, and there is more explanation at the top of security\\Auth.php
. 这是最新的版本,在security\\Auth.php
顶部有更多说明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.