mirror of https://github.com/jesopo/ircrobots
15 lines
427 B
Python
15 lines
427 B
Python
|
from typing import Optional
|
||
|
from dataclasses import dataclass
|
||
|
|
||
|
@dataclass
|
||
|
class SASLParams(object):
|
||
|
mechanism: str
|
||
|
username: Optional[str] = None
|
||
|
password: Optional[str] = None
|
||
|
class SASLUserPass(SASLParams):
|
||
|
def __init__(self, username: str, password: str):
|
||
|
super().__init__("USERPASS", username, password)
|
||
|
class SASLExternal(SASLParams):
|
||
|
def __init__(self):
|
||
|
super().__init__("EXTERNAL")
|