RESTful API
Alan DeKok
aland at deployingradius.com
Thu Dec 27 16:00:26 CET 2018
On Dec 27, 2018, at 4:48 AM, Daniel Kong <daniel.kongyh at gmail.com> wrote:
>
> Hi, thanks for the guidance. However, I encounter a problem in the rest
> basic http authentication even though I have provided in the configuration
> file.
> ...
> And here is my radius output
> ...
> rlm_rest (rest): Connecting to "http://10.18.6.22:8081/apps"
> rlm_rest (rest): Reserved connection (8)
> (3) rest: Expanding URI components
> (3) rest: EXPAND http://10.18.6.22:8081
> (3) rest: --> http://10.18.6.22:8081
> (3) rest: EXPAND /apps/user/%{User-Name}/%{User-Password}
> (3) rest: --> /apps/user/user1/password1
> (3) rest: Sending HTTP GET to "
> http://10.18.6.22:8081/apps/user/user1/password1"
> (3) rest: Processing response header
> (3) rest: Status : 401 (Unauthorized)
That seems to be clear.
> (3) rest: Type : json (application/json)
> (3) rest: Parsing attribute "result"
> (3) rest: WARNING: Failed parsing attribute: Invalid vendor name in
> attribute name "result", skipping...
> (3) rest: Parsing attribute "message"
> (3) rest: WARNING: Failed parsing attribute: Invalid vendor name in
> attribute name "message", skipping...
The response is json, but not what the REST module expects.
> Please let me know where did I go wrong.
The debug log is pretty clear. The user is unauthorized. And, the response isn't what the module expects.
The module documentation explains *very* clearly what it sends to the REST API, and what it expects back from the REST API.
Alan DeKok.
More information about the Freeradius-Users
mailing list