Re: JSON format to use for rlm_rest
Hi Arran Not compiling on my side : CC src/modules/rlm_rest/rest.c src/modules/rlm_rest/rest.c: In function 'rest_write_header': src/modules/rlm_rest/rest.c:1465: error: invalid operands to binary - (have 'long unsigned int' and 'const char *') make: *** [build/objs/src/modules/rlm_rest/rest.lo] Error 1 I'm also not sure how to specify if the vp should be for control or reply as in the Perl server example : $resp->header("Content-Type" => "application/x-www-form-urlencoded"); $resp->content("control:Cleartext-Password=password&reply:Reply-Message=testing123"); Here the control and reply are separate. Am I understanding this correctly? Thanks for the help.
On 17 Mar 2014, at 06:08, Werner Stucky <wernerml@stucky-solutions.net> wrote:
Hi Arran
Not compiling on my side :
CC src/modules/rlm_rest/rest.c src/modules/rlm_rest/rest.c: In function ‘rest_write_header’: src/modules/rlm_rest/rest.c:1465: error: invalid operands to binary - (have ‘long unsigned int’ and ‘const char *’) make: *** [build/objs/src/modules/rlm_rest/rest.lo] Error 1
Sorry, just pushed a fix.
I'm also not sure how to specify if the vp should be for control or reply as in the Perl server example : $resp->header("Content-Type" => "application/x-www-form-urlencoded"); $resp->content("control:Cleartext-Password=password&reply:Reply-Message=testing123");
Here the control and reply are separate. Am I understanding this correctly?
Just use the list qualifier control:<attribute> or reply:<attribute> the default list will be reply. Unlike update sections where you can set the default list: update control { <attr> <op> <value> <attr> <op> <value> } The list override must be specified on a per attribute basis: { "control:ClearText-Password": "12345", "reply:Reply-Message": "foo", "reply:Reply-Message":{ do_xlat:false, is_json:true, op:"+=", value:{ bar:"baz" } } } Would result in control Cleartext-Password := 12345 reply Reply-Message := 'foo' reply-Message += '{ bar:"baz" }' -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (2)
-
Arran Cudbard-Bell -
Werner Stucky