JSON format to use for rlm_rest
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Mon Mar 17 07:32:19 CET 2014
On 17 Mar 2014, at 06:08, Werner Stucky <wernerml at 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 at freeradius.org>
FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/mailman/private/freeradius-users/attachments/20140317/40a9ea28/attachment.pgp>
More information about the Freeradius-Users
mailing list