aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Twisted/py2/twisted/cred/error.py
blob: efd3ec34266a803729520a34b151ebc6124e7ba7 (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Cred errors.
"""

from __future__ import division, absolute_import


class Unauthorized(Exception):
    """Standard unauthorized error."""



class LoginFailed(Exception):
    """
    The user's request to log in failed for some reason.
    """



class UnauthorizedLogin(LoginFailed, Unauthorized):
    """The user was not authorized to log in.
    """



class UnhandledCredentials(LoginFailed):
    """A type of credentials were passed in with no knowledge of how to check
    them.  This is a server configuration error - it means that a protocol was
    connected to a Portal without a CredentialChecker that can check all of its
    potential authentication strategies.
    """



class LoginDenied(LoginFailed):
    """
    The realm rejected this login for some reason.

    Examples of reasons this might be raised include an avatar logging in
    too frequently, a quota having been fully used, or the overall server
    load being too high.
    """