mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
562 B
31 lines
562 B
2 years ago
|
import abc
|
||
|
|
||
|
|
||
|
class BaseConfirm(abc.ABC):
|
||
|
|
||
|
def __init__(self, user, request):
|
||
|
self.user = user
|
||
|
self.request = request
|
||
|
|
||
|
@property
|
||
|
@abc.abstractmethod
|
||
|
def name(self) -> str:
|
||
|
return ''
|
||
|
|
||
|
@property
|
||
|
@abc.abstractmethod
|
||
|
def display_name(self) -> str:
|
||
|
return ''
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
def check(self) -> bool:
|
||
|
return False
|
||
|
|
||
|
@property
|
||
|
def content(self):
|
||
|
return ''
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
def authenticate(self, secret_key, mfa_type) -> tuple:
|
||
|
return False, 'Error msg'
|