forked from shaba/openuds
a couple of comments
This commit is contained in:
parent
3b18597d8e
commit
5884cde35c
@ -116,6 +116,7 @@ class RadiusAuth(auths.Authenticator):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def radiusClient(self) -> client.RadiusClient:
|
def radiusClient(self) -> client.RadiusClient:
|
||||||
|
""" Return a new radius client . """
|
||||||
return client.RadiusClient(
|
return client.RadiusClient(
|
||||||
self.server.value,
|
self.server.value,
|
||||||
self.secret.value.encode(),
|
self.secret.value.encode(),
|
||||||
@ -159,6 +160,7 @@ class RadiusAuth(auths.Authenticator):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def test(env, data):
|
def test(env, data):
|
||||||
|
""" Test the connection to the server . """
|
||||||
try:
|
try:
|
||||||
auth = RadiusAuth(None, env, data) # type: ignore
|
auth = RadiusAuth(None, env, data) # type: ignore
|
||||||
return auth.testConnection()
|
return auth.testConnection()
|
||||||
@ -168,7 +170,8 @@ class RadiusAuth(auths.Authenticator):
|
|||||||
)
|
)
|
||||||
return [False, _('Error testing connection')]
|
return [False, _('Error testing connection')]
|
||||||
|
|
||||||
def testConnection(self): # pylint: disable=too-many-return-statements
|
def testConnection(self):
|
||||||
|
""" Test connection to Radius Server """
|
||||||
try:
|
try:
|
||||||
connection = self.radiusClient()
|
connection = self.radiusClient()
|
||||||
# Reply is not important...
|
# Reply is not important...
|
||||||
|
Loading…
Reference in New Issue
Block a user