跳转到主要内容

可插拔认证机制(已废弃)

项目描述

此包提供了可插拔认证工具的原生实现。它已被zope.app.authentication取代。

详细文档

新的认证服务设计

当前实现将被替换。以下是我与Jim Fulton一起构思的设计方案。 – itamar

请注意,此设计(以某种形式)已由可插拔认证服务实现。此文档需要更新以反映最终实现。

新的AuthenticationService设计笔记

服务包含一个用户源列表。它们实现接口,从

class IUserPassUserSource:
    """Authenticate using username and password."""

    def authenticate(username, password):
        "Returns boolean saying if such username/password pair exists"


class IDigestSupportingUserSource(IUserPassUserSource):
    """Allow fetching password, which is required by digest auth methods"""

    def getPassword(username):
        "Return password for username"

等。可能还有其他接口,用于处理证书认证等。可能需要扩展上述接口以处理主体标题和描述等。

登录方法(cookie认证、HTTP基本认证、摘要认证、FTP认证)注册为上述接口之一的视图。

class ILoginMethodView:

      def authenticate():
           """Return principal for request, or None."""

      def unauthorized():
           """Tell request that a login is required."""

认证服务实现如下

class AuthenticationService:

    def authenticate(self, request):
        for us in self.userSources:
             loginView = getView(self, us, "login", request)
             principal = loginView.authenticate()
             if principal is not None:
                 return principal

    def unauthorized(self, request):
        loginView = getView(self, self.userSources[0], request)
        loginView.unauthorized()

变更日志

3.4.0 (2007-10-25)

  • 首次发布,独立于主Zope树。

项目详情


下载文件

下载适用于您平台上的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

zope.app.pluggableauth-3.4.0.tar.gz (12.5 kB 查看哈希值)

上传时间 源代码

由以下组织支持

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF赞助商 PingdomPingdom 监控 SentrySentry 错误日志 StatusPageStatusPage 状态页面