From aebf32d7be303527175624f06f5a2a2d4bbb3d48 Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Thu, 14 Nov 2019 10:56:29 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E5=88=A0=E9=99=A4=20py-radius=20?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/backends/radius.py | 31 -------------------------- requirements/requirements.txt | 1 - 2 files changed, 32 deletions(-) diff --git a/apps/authentication/backends/radius.py b/apps/authentication/backends/radius.py index 9e0f7167b..47f369205 100644 --- a/apps/authentication/backends/radius.py +++ b/apps/authentication/backends/radius.py @@ -51,34 +51,3 @@ class RadiusBackend(CreateUserMixin, RADIUSBackend): class RadiusRealmBackend(CreateUserMixin, RADIUSRealmBackend): pass - - -class TestRadiusPyRadius(object): - - def __init__(self, username, password): - self.username = username - self.password = password - self.secret = settings.CONFIG.RADIUS_SECRET - self.host = settings.CONFIG.RADIUS_SERVER - self.port = settings.CONFIG.RADIUS_PORT - - def attr_to_json(self): - attr_json = { - 'username': self.username, - 'password': self.password, - 'secret': self.secret, - 'host': self.host, - 'port': self.port - } - return attr_json - - def authenticate(self): - import radius - print('Authenticate Radius start: ') - params = self.attr_to_json() - print("Params: {}".format(params)) - r = radius.authenticate( - self.username, self.password, - self.secret, host=self.host, port=int(self.port) - ) - print("Result: {}".format(r)) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index c43046d3c..d99c6ee27 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -89,4 +89,3 @@ flower==0.9.3 channels-redis==2.4.0 channels==2.3.0 daphne==2.3.0 -py-radius==2.0.2.post1