Kohana - 验证用户身份?
我想使用 Kohana 3 框架开始一个简单的项目(看起来非常有前途),但我认为文档有点缺乏,并且希望有一些指导来帮助我入门并开始。所以我有一个简单的用例问题,大多数应用程序都需要这个问题。
您将如何呈现带有用户名和密码的登录表单,捕获它,处理它并返回失败或成功?它如何保持用户会话(对象?)持久?我是 Kohana 的新手,具有 Drupal 背景。
I would like to get started on a simple project using the Kohana 3 framework (looks very promising), but the docs are a bit lacking in my opinion and would like some direction to get my feet wet and get me started. So I have a simple use-case question one that most every application needs.
How would you present a login form with a username and password, capture this, process it and return either fail or success? And how does it keep a user session (object?) persistent? I am new to Kohana with a Drupal background.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,有一个 Auth 模块,您可以看一下它是如何工作的。
关于 Kohana 3 的文档有点缺乏,你是对的,但我认为开发人员希望选择它的人更有经验,并且愿意深入了解它。
我发现的一些用于了解有关 Kohana 3 的更多信息的有用资源如下:
Well, there's an Auth module that you can take a look at to see how it works.
You're right about the docs for Kohana 3 being a bit lacking, but I think the developers expect people picking it up to be a bit more experienced and willing to look under the hood.
A few useful resources I've found for learning more about Kohana 3 are the following:
看看这个 教程。它使用 Kohana_Auth 来验证用户身份。
Take a look at this tutorial. It is on using Kohana_Auth to authenticate users.