grok应用程序的身份验证

dolmen.authentication的Python项目详细描述


坐在zope.pluggableauth包的顶部, dolmen.authentication扩展它以添加可重用组件 描述和实现。

概述

dolmen.authentication提供接口和组件:

>>> import dolmen.authentication
>>> from dolmen.authentication import IAuthenticationInterfaces
>>> from dolmen.authentication import IAuthenticationEvents
>>> from dolmen.authentication import IAuthenticationAPI

>>> IAuthenticationAPI.isOrExtends(IAuthenticationInterfaces)
True

>>> IAuthenticationAPI.isOrExtends(IAuthenticationEvents)
True

>>> from zope.interface.verify import verifyObject
>>> verifyObject(IAuthenticationAPI, dolmen.authentication)
True

描述性接口

dolmen.authentication提供了一组基本接口,可以是 用于规范化身份验证系统:

>>> print IAuthenticationInterfaces.__doc__
This interface describes and exposes the meaningful interfaces
of the authentication module.

>>> interfaceDescription(IAuthenticationInterfaces)
IPrincipalFolder: A container specialized in storing principal representations.
IAccountStatus: Abstraction component allowing to check the status of a principal.
IPrincipal: A principal representation, directly inheriting from zope.security IPrincipal, but redefining several fields for a user-friendly form display.
IGroup: A logical grouping of principals. This component is an IPrincipal itself.
IPasswordProtected: This interface defines any component protected by a password
IPasswordChecker: Abstraction component in charge of resolving a principal'scredentials.

>>> IAuthenticationInterfaces.providedBy(dolmen.authentication.interfaces)
True

>>> verifyObject(IAuthenticationInterfaces, dolmen.authentication.interfaces)
True

事件接口和实现

dolmen.authentication提供了一组基本事件,可以是 使用和拒绝,以便处理和跟踪主体的生命周期:

>>> print IAuthenticationEvents.__doc__
This interface describes and exposes the meaningful events
descriptions and components of the authentication module.

>>> interfaceDescription(IAuthenticationEvents)
IUserLoggedOutEvent: IObjectEvent extending event : a user has logged out.
IUserLoggedInEvent: IObjectEvent extending event : a user has logged in.
UserLogoutEvent: An IUserLoggedOutEvent implementation.
UserLoginEvent: An IUserLoggedInEvent implementation.

>>> IAuthenticationEvents.providedBy(dolmen.authentication.events)
True

>>> verifyObject(IAuthenticationEvents, dolmen.authentication.events)
True

更改

0.3(2012-01-17)

  • Updates on code to fit last changes in the Dolmen/Grok stack.

0.2(2010-05-29)

  • the LocatablePrincipalInfo adapter now implements _and_ provides the IPrincipalInfo interface. This allows the adapter to be used in the AuthenticatedPrincipalFactory adaptation.

0.1(2010-03-26)

  • Initial release.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java中使合并排序只使用(n/2+1)额外空间的算法   将随机整数作为唯一ID从java插入mysql   试图通过Maven添加MySQL连接器时的java阻碍   使用CDI从producer为HashMap注入java歧义   java如何解决htmlUnit WrapsDriver错误   使用Java插入段落和子段落的级别   java复选框和文本视图与空白对齐   在Javascript警报中显示Java列表值   java在EclipseLuna的maven项目中构建成功后如何运行   java Spring MVC 3.1请求头字符编码问题[UTF8]   java将DAO公开为web服务   java如何知道@RequestMapping的哪个参数被调用   java如何根据设备启用硬件加速   使用byaccj构建ast时出现java错误   pdf如何使用iText Java垂直显示段落中的内容   java Selenium与Apache Poi在Excel中保存错误消息   安卓gson。JsonSyntaxException:java。lang.illegalstate例外:   Flex应用程序中浏览器缩放的java问题