我正在开发一个基于 Grails 的 Web 应用程序,我需要选择这两个框架之一进行身份验证。在您看来,选择 Acegi 的标准是什么,选择 Apache Shiro 的标准是什么?
4 回答
我还要指出,Springsource官方支持“Spring Security Plugin”,所以在其他条件相同的情况下,“Spring Security Plugin”对我来说是更好的选择。
我认为选择一个而不是另一个的最大原因是基于你的心理模型,这对你来说最有意义。这两个框架都非常成熟,并且已经存在多年。如果这对您很重要,两者都会得到专业支持。两者都有优秀的工程师和充满活力的社区。我会说两者都试一下,看看什么对你来说“感觉”更好。
我之前在这里发布过 - 希望这会有所帮助:
I had been a big Spring Security plugin user. It is easy to install and get running. It also offers generic registration creation in addition to the base user, requestmaps and roles generation. However, recently I was trying to implement the Facebook Open Graph plugin and allow users multiple ways of registering and I found it difficult to do with (could have been because of the lack of experience) ... I found an article on facebook intergration except it required the use of Shiro. So, this forced me to try it out... I have to say, although documentation is lacking a bit... Shiro is pretty powerful. What I especially liked is the built in permissions logic! Extremely powerful.
Anyways, Im torn, because I can appreciate the simplicity and the existence of documentation for Spring Security, but for my requirements... Shiro won.
(by the way, I posted more than one question on the topic of Spring Security + Facebook Connect or Facebook Graph plugin. Not one got answered... as a matter of fact, was recommended to try using Shiro or the Nimble plugin. Nimble is based off Shiro and has support for just about everything you need in addition to all user, role, permissions, group maintenance coded from the start. Nimble was too much for my needs, so I stuck with Shiro)
我两种都试过了,在我看来,Acegi 的粒度更细,记录也更好。它提供了许多功能:用于保护应用程序的 URL、注释或数据库请求图,您可以获得可选的 SSO、Facebook 身份验证等。我认为 Shiro 非常适合小型项目,但 Shiro 文档仍然缺少很多东西,你必须弄清楚自己出去。所以我的感觉是,这取决于你的项目。如果我应该根据我目前的经验进行选择,我会选择 Acegi。