Using the authenticate function on rlm_python
Francis Augusto Medeiros-Logeay
r_f at med-lo.eu
Thu Nov 14 20:29:04 UTC 2024
Hi there,
I am trying to write a python script to be used by the python module of Freeradius.
My main goal is to send an Access-Challenge to the user so that he would reply to that challenge.
On perl, usually this «Response-Packet-Type» is configured on RAD_CHECK. But how do we send this in Python?
I tried this:
def authenticate(p):
print("*** authenticate ***")
print("")
radiusd.radlog(radiusd.L_INFO, "*** log call in authenticate ***")
print("")
print(p)
print(radiusd.config)
print("")
reply = ( ('Reply-Message', 'Hello from rlm_python'), ('State', 'test'), ('Response-Packet-Type', 'Access-Challenge') )
# config = ( ('Response-Packet-Type' , 'Acccess-Challenge'), )
config = ( ('Cleartext-Password' , '123'), )
return (radiusd.RLM_MODULE_HANDLED, reply,None)
But without any success.
Any clues of what to do here?
Best,
Francis
--
Francis Augusto Medeiros-Logeay
Oslo, Norway
More information about the Freeradius-Users
mailing list