Using the rest module
Francis Augusto Medeiros-Logeay
r_f at med-lo.eu
Sat Nov 16 18:06:34 UTC 2024
Hi,
I’m fairly new to Freeradius, and today I took the time to read the documentation and to search what’s a best practice to implement some polling-based (blocking) authentication with FreeRADIUS towards a rest api server.
I tried with Python first, but since I’m having trouble with concurrency, so I’m exploring other alternatives. The rest module seems like a fit, but I didn’t find much about other possibilities rather than interpreting the response code and having a json as a response that match existing attributes.
In my case, I need simply to evaluate a value of a nested json key that doesn’t really match any existing attributes.
Is there a way to do it?
For example:
{ ‘detail’ : { ‘ result’ : { ‘value’ :’true’}}}
I need to authenticate that user based on the value of ‘value’. Is the rest module a good tool for this?
I saw that there is a json module that might be used with the rest, but it doesn’t seem to be available for the version I am using (3.0.21 on RHEL 9).
I have three api calls, to three different url’s, so I figured out how to create multiple instances of the rest module, which is great. It’s just the response logic that I’m failing to understand.
Could anyone point me to the right direction?
Best,
Francis
More information about the Freeradius-Users
mailing list