[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security - IAuthorizer.py:1.1.2.1 ICredentials.py:1.1.2.1 IExtractCredentials.py:1.1.2.1 ILocalRoleManger.py:1.1.2.1
Tres Seaver
tseaver@zope.com
Fri, 30 Nov 2001 17:41:58 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security
In directory cvs.zope.org:/tmp/cvs-serv697
Added Files:
Tag: Zope-3x-branch
IAuthorizer.py ICredentials.py IExtractCredentials.py
ILocalRoleManger.py
Log Message:
- New interfaces for security framework.
=== Added File Zope3/lib/python/Zope/App/Security/IAuthorizer.py ===
# Copyright (c) 2001 Zope Coporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
""" Stock user interface """
from Interface import Interface
class IAuthorizer( Interface ):
"""
Interface for features which know how to find placeful roles
for a user.
"""
=== Added File Zope3/lib/python/Zope/App/Security/ICredentials.py ===
# Copyright (c) 2001 Zope Coporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
""" Declare opaque interface for user credentials. """
from Interface import Interface
class ICredentials( Interface ):
"""
Marker interface for opaque credentials returned from an
IExtractCredentials.
"""
=== Added File Zope3/lib/python/Zope/App/Security/IExtractCredentials.py ===
# Copyright (c) 2001 Zope Coporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
""" Declare IExtractCredentials. """
from Interface import Interface
class IExtractCredentials( Interface ):
"""
Interface for presentations which extract credentials from requests.
"""
def getCredentials( request ):
"""
Return an ICredentials extracted from 'request', or None.
"""
=== Added File Zope3/lib/python/Zope/App/Security/ILocalRoleManger.py ===
# Copyright (c) 2001 Zope Coporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
""" Interface for objects willing to be bound to users via local roles. """
from Interface import Interface
class ILocalRoleManager( Interface ):
"""
Marker interface for objects which are willing to have
"local roles" relationships with users.
"""