File: iepsilon.py

package info (click to toggle)
epsilon 0.7.0-2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 636 kB
  • sloc: python: 5,454; makefile: 15; sh: 5
file content (25 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (c) 2008 Divmod.  See LICENSE for details.

"""
Epsilon interfaces.
"""
from zope.interface import Attribute

from twisted.cred.credentials import ICredentials


class IOneTimePad(ICredentials):
    """
    A type of opaque credential for authenticating users, which can be used
    only a single time.

    This interface should also be responsible for authenticating.  See #2784.
    """
    padValue = Attribute(
        """
        C{str} giving the value of the one-time pad.  The value will be
        compared by a L{twisted.cred.checkers.ICredentialsChecker} (e.g.
        L{epsilon.ampauth.OneTimePadChecker}) against all valid one-time pads.
        If there is a match, login will be successful and the pad will be
        invalidated (further attempts to use it will fail).
        """)