mirror of https://github.com/progval/irctest.git
14 lines
365 B
Python
14 lines
365 B
Python
import enum
|
|
import collections
|
|
|
|
@enum.unique
|
|
class Mechanisms(enum.Enum):
|
|
@classmethod
|
|
def as_string(cls, mech):
|
|
return {cls.plain: 'PLAIN'}[mech]
|
|
plain = 1
|
|
|
|
Authentication = collections.namedtuple('Authentication',
|
|
'mechanisms username password certificate')
|
|
Authentication.__new__.__defaults__ = ([Mechanisms.plain], None, None, None)
|