API Reference

Registry

Global Authentication Utility or Principal Registry

exception zope.principalregistry.principalregistry.DuplicateLogin[source]

Bases: exceptions.Exception

exception zope.principalregistry.principalregistry.DuplicateId[source]

Bases: exceptions.Exception

class zope.principalregistry.principalregistry.PrincipalRegistry[source]

Bases: object

An in-memory implementation of zope.authentication.interfaces.IAuthentication and zope.authentication.interfaces.ILogout.

zope.principalregistry.principalregistry.principalRegistry = <zope.principalregistry.principalregistry.PrincipalRegistry object>

The global registry that the ZCML directives will modify.

class zope.principalregistry.principalregistry.Principal(id, title, description, login, pw, pwManagerName='Plain Text')[source]

Bases: zope.principalregistry.principalregistry.PrincipalBase

The default implementation of zope.security.interfaces.IGroupAwarePrincipal that PrincipalRegistry will create.

class zope.principalregistry.principalregistry.UnauthenticatedPrincipal(id, title, description)[source]

Bases: zope.principalregistry.principalregistry.PrincipalBase

An implementation of zope.authentication.interfaces.IUnauthenticatedPrincipal.

class zope.principalregistry.principalregistry.UnauthenticatedGroup(id, title, description)[source]

Bases: zope.principalregistry.principalregistry.Group

An implementation of zope.authentication.interfaces.IUnauthenticatedGroup.

class zope.principalregistry.principalregistry.AuthenticatedGroup(id, title, description)[source]

Bases: zope.principalregistry.principalregistry.Group

An implementation of zope.authentication.interfaces.IAuthenticatedGroup.

class zope.principalregistry.principalregistry.EverybodyGroup(id, title, description)[source]

Bases: zope.principalregistry.principalregistry.Group

An implementation of zope.authentication.interfaces.IEverybodyGroup.

ZCML Directives

Schemas for directives that define principals and groups

class zope.principalregistry.metadirectives.TextId(min_length=0, max_length=None, **kw)[source]

Bases: zope.schema._field.Id

An Id that is the text type instead of a native string.

This is required because IPrincipal defines id to be the text type.

interface zope.principalregistry.metadirectives.IBasePrincipalDirective[source]

Base interface for principal definition directives.

id

Id

Id as which this object will be known and used.

Implementation:zope.principalregistry.metadirectives.TextId
Read Only:False
Required:True
Default Value:None
Allowed Type:unicode
title

Title

Provides a title for the object.

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:unicode
description

Title

Provides a description for the object.

Implementation:zope.schema.TextLine
Read Only:False
Required:False
Default Value:None
Allowed Type:unicode
interface zope.principalregistry.metadirectives.IDefinePrincipalDirective[source]

Extends: zope.principalregistry.metadirectives.IBasePrincipalDirective

Define a new principal.

login

Username/Login

Specifies the Principal’s Username/Login.

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:unicode
password

Password

Specifies the Principal’s Password.

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:None
Allowed Type:unicode
password_manager

Password Manager Name

Name of the password manager will be used for encode/check the password

Implementation:zope.schema.TextLine
Read Only:False
Required:True
Default Value:u’Plain Text’
Allowed Type:unicode
interface zope.principalregistry.metadirectives.IDefineUnauthenticatedPrincipalDirective[source]

Extends: zope.principalregistry.metadirectives.IBasePrincipalDirective

Define a new unauthenticated principal.

interface zope.principalregistry.metadirectives.IDefineUnauthenticatedGroupDirective[source]

Extends: zope.principalregistry.metadirectives.IBasePrincipalDirective

Define the unauthenticated group.

interface zope.principalregistry.metadirectives.IDefineAuthenticatedGroupDirective[source]

Extends: zope.principalregistry.metadirectives.IBasePrincipalDirective

Define the authenticated group.

interface zope.principalregistry.metadirectives.IDefineEverybodyGroupDirective[source]

Extends: zope.principalregistry.metadirectives.IBasePrincipalDirective

Define the everybody group.

Directives for defining principals and groups

zope.principalregistry.metaconfigure.principal(_context, id, title, login, password, description='', password_manager='Plain Text')[source]

Implementation of zope.principalregistry.metadirectives.IDefinePrincipalDirective.

zope.principalregistry.metaconfigure.unauthenticatedPrincipal(_context, id, title, description='')[source]

Implementation of zope.principalregistry.metadirectives.IDefineUnauthenticatedPrincipalDirective.

zope.principalregistry.metaconfigure.unauthenticatedGroup(_context, id, title, description='')[source]

Implementation of zope.principalregistry.metadirectives.IDefineUnauthenticatedGroupDirective.

zope.principalregistry.metaconfigure.authenticatedGroup(_context, id, title, description='')[source]

Implementation of zope.principalregistry.metadirectives.IDefineAuthenticatedGroupDirective.

zope.principalregistry.metaconfigure.everybodyGroup(_context, id, title, description='')[source]

Implementation of zope.principalregistry.metadirectives.IDefineEverybodyGroupDirective.