Ejemplo n.º 1
0
def generate_password(request):
	"""
	Generate random password
	:param request: HTTP request
	:return: dict with 'password' key
	"""
	return JsonResponse({'password': CommonService.get_random_string(10)})
Ejemplo n.º 2
0
	def generate_mailbox_data():
		"""
		Generate new mailbox data
		:return: ServiceResponse: {'login': <login>, 'password': <password>}
		"""
		login = CommonService.get_random_string(6, only_digits=True)
		password = ApiService.generate_email_password(login)
		return ServiceResponse(True, {'login': '******' % (login, settings.DOMAIN), 'password': password})
Ejemplo n.º 3
0
    def generate_mailbox_data():
        """
		Generate new mailbox data
		:return: ServiceResponse: {'login': <login>, 'password': <password>}
		"""
        login = CommonService.get_random_string(6, only_digits=True)
        password = ApiService.generate_email_password(login)
        return ServiceResponse(True, {
            'login': '******' % (login, settings.DOMAIN),
            'password': password
        })