Source code for univention.management.console.modules.passwordreset.send_plugin
#
# Univention Password Self Service frontend base class
#
# SPDX-FileCopyrightText: 2015-2025 Univention GmbH
# SPDX-License-Identifier: AGPL-3.0-only
from univention.config_registry import ConfigRegistry
from univention.lib.i18n import Translation
_ = Translation('univention-self-service-passwordreset-umc').translate
[docs]
class UniventionSelfServiceTokenEmitter:
"""base class"""
def __init__(self, log):
self.ucr = ConfigRegistry()
self.ucr.load()
self.data = {}
self.log = log
[docs]
@staticmethod
def send_method():
return "????"
[docs]
@staticmethod
def send_method_label():
return _("????")
[docs]
@staticmethod
def message_application():
return 'password_reset'
[docs]
@staticmethod
def is_enabled():
ucr = ConfigRegistry()
ucr.load()
return ucr.is_true("umc/self-service/passwordreset/????/enabled")
@property
def udm_property(self):
return "self-service-????"
[docs]
def password_reset_verified_recovery_email(self):
return self.message_application() == "password_reset" and self.udm_property == "PasswordRecoveryEmail"
@property
def token_length(self):
return 1024
[docs]
def set_data(self, data):
self.data.update(data)
[docs]
def send(self):
raise NotImplementedError("Implement me")