~ztk-steering-group/zope.authentication/trunk-SVN

« back to all changes in this revision

Viewing changes to src/zope/authentication/logout.py

  • Committer: nadako
  • Date: 2009-03-11 22:31:33 UTC
  • Revision ID: svn-v4:62d5b8a3-27da-0310-9561-8e5933582275:zope.authentication/trunk:97931
Get some shape.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##############################################################################
 
2
#
 
3
# Copyright (c) 2009 Zope Corporation and Contributors.
 
4
# All Rights Reserved.
 
5
#
 
6
# This software is subject to the provisions of the Zope Public License,
 
7
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
 
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 
11
# FOR A PARTICULAR PURPOSE.
 
12
#
 
13
##############################################################################
 
14
"""ILogout implementations
 
15
 
 
16
$Id$
 
17
"""
 
18
from zope.component import adapts
 
19
from zope.interface import implements, Interface
 
20
 
 
21
from zope.authentication.interfaces import IAuthentication
 
22
from zope.authentication.interfaces import ILogout, ILogoutSupported
 
23
 
 
24
 
 
25
class NoLogout(object):
 
26
    """An adapter for IAuthentication utilities that don't implement ILogout."""
 
27
 
 
28
    adapts(IAuthentication)
 
29
    implements(ILogout)
 
30
 
 
31
    def __init__(self, auth):
 
32
        pass
 
33
 
 
34
    def logout(self, request):
 
35
        pass
 
36
 
 
37
 
 
38
class LogoutSupported(object):
 
39
    """A class that can be registered as an adapter to flag logout support."""
 
40
 
 
41
    adapts(Interface)
 
42
    implements(ILogoutSupported)
 
43
 
 
44
    def __init__(self, dummy):
 
45
        pass