PHP登录类 [英] PHP login class

查看:127
本文介绍了PHP登录类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个好的 PHP登录类通过MySQL和我还没有完全满意,任何事情我发现。这<一个href=\"http://stackoverflow.com/questions/686185/best-starting-point-for-a-website-with-user-management-functionality\">prior SO质疑并没有真正满足我的需求,我想preFER远离PEAR路程,codeIgniter,只是有一个简单的小PHP类来完成这项工作。

I'm looking for a good PHP login class via MySQL, and I'm not yet completely satisfied with anything I've found. This prior SO question doesn't really address my needs, as I'd prefer to stay away from PEAR and CodeIgniter, and just have a simple and small PHP class to do the job.

有这么有几个选择 TalkPHP论坛从,但他们都似乎有东西或其他缺乏。

There's a TalkPHP forum that has several to choose from, but they all seem to have something or other lacking.


  • PHP登录类通过的 DAZ :似乎有点棘手的延伸,并且不支持多个用户角色

  • TalkPHP.com_Login_Script.PHP5.Beta_1通过 Wildhoney :看起来很可扩展的,支持可配置的用户角色,但没有明文DB支持和存储密码在一个XML文件

  • authclass 通过的山姆·格兰杰:再次,为多个用户角色不支持,但是没有使用MySQL

  • PHP Login Class by daz: seems a little tricky to extend, and doesn't support multiple user roles
  • TalkPHP.com_Login_Script.PHP5.Beta_1 by Wildhoney: looks very extensible, supports configurable user roles, but no db support and stores passwords in plaintext in an XML file!
  • authclass by Sam Granger: again, no support for multiple user roles, but does use MySQL

现在,我的第一反应是,只是在重新code中的最后一个在该列表中(authclass)潜水,但幸运的是,我的第二反应是想的问计算器的:)

Now, my first instinct was to just dive in a re-code the last one in that list (authclass), but fortunately, my second instinct was to ask stackoverflow :)

因此​​,这里的大问题:有没有的安全 开源 多用户角色登录类的 PHP5 MySQL的,任何人在使用?在此先感谢,我AP preciate任何形式的评论在这里,即使你没有code的一段特定指向!

So here's the big question: is there a secure, open source, multiple-user-role login class for PHP5 and MySQL that anyone is using? Thanks in advance, and I appreciate any kind of comments here, even if you don't have a particular piece of code to point to!

推荐答案

看看 Zend_Auth的

Zend_Auth的只关心
  认证和不与
  授权。验证是
  宽松地定义​​为确定是否
  实体实际上是它所声称
  是(即,标识),基于
  一些组凭据。
  授权决定的过程中
  是否允许实体访问,
  或在其他执行操作
  实体是书的范围
   Zend_Auth的

对于多用户角色(授权)实现看看 所以Zend_Acl

For a multiple-user-role (authorization) implementation take a look at Zend_Acl:

Zend_Acl提供一个轻量级的和
  灵活的访问控制列表(ACL)
  实施权限
  管理。在一般情况下,一个应用
  可以利用这样的ACL的控制
  访问由某些保护对象
  其他请求的对象。

Zend_Acl provides a lightweight and flexible access control list (ACL) implementation for privileges management. In general, an application may utilize such ACL's to control access to certain protected objects by other requesting objects.

请记住,它可能利用那些无需提交使用整个 Zend_Framework 的,因为它不是一个全栈框架,我在没有办法试图鼓励你使用上面,或任何与此有关的框架。只是想我会提到这些,因为他们都没有了。

Please keep in mind that it's possible to make use of those without having to commit to using the entire Zend_Framework, as it's not a full-stack framework, and I'm in no way trying to encourage you to use the above, or any framework for that matter. Just thought I would mention those as they haven't been already.

这篇关于PHP登录类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆