rest modules JSON replies format and types
Louis Munro
lmunro at inverse.ca
Thu Feb 4 16:26:39 CET 2016
> On Feb 3, 2016, at 16:45 , Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
>
> Try with with compact version:
>
> {
> "Tunnel-Private-Group-ID": 2
> }
>
> and then if that doesn't work:
>
> {
> "Tunnel-Private-Group-ID": "2"
> }
>
>
The first works for me.
The (perl) module I use to serialize to JSON automatically quotes strings and leaves integers as is.
So
{
"Airespace-ACL-Name": "registration",
"Tunnel-Medium-Type": 6,
"Tunnel-Type": 13,
"Tunnel-Private-Group-ID": 2
}
Seems to work just fine and results in
(8) Sent Access-Accept Id 200 from 172.20.20.96:1812 to 172.20.110.250:32769 length 0
(8) User-Name = "joetester"
(8) Tunnel-Private-Group-Id = "2"
(8) Tunnel-Type = VLAN
(8) Tunnel-Medium-Type = IEEE-802
(8) Airespace-ACL-Name = "registration"
(8) MS-MPPE-Recv-Key = 0xb20b4de20b6a2dad2adcbdc6e895133bd1b9bc332ff0abe58095c6da1926517b
(8) MS-MPPE-Send-Key = 0x179b0a6f723109bf0708039c6dd04ae4353eadd9ef95652bc93d748785b77acb
(8) EAP-Message = 0x03090004
(8) Message-Authenticator = 0x00000000000000000000000000000000
(8) Finished request
>
> Run with -Xx to get extra info.
>
>> Should I be looking into parsing the dictionary files in my REST service to populate the reply with the correct types?
>> Not that it would be that hard, but if it does not matter I can find better ways of keeping myself entertained...
>
> Nah.
Thank you for setting me straight.
I was making this more complicated than it deserved.
I’ll go and shave some other yak now.
Regards,
--
Louis Munro
lmunro at inverse.ca :: www.inverse.ca
+1.514.447.4918 x125 :: +1 (866) 353-6153 x125
Inverse inc. :: Leaders behind SOGo (www.sogo.nu) and PacketFence (www.packetfence.org)
More information about the Freeradius-Users
mailing list