[prev in list] [next in list] [prev in thread] [next in thread]
List: freeradius-users
Subject: Re: help on REST HTTP-headers
From: "Mark Grayson \(mgrayson\) via Freeradius-Users" <freeradius-users () lists ! freerad
Date: 2020-07-24 10:43:17
Message-ID: C54DE7F8-53E9-4424-8B9C-5A6E085DABCC () cisco ! com
[Download RAW message or body]
Hi Matthew
> update control {
> &REST-HTTP-Header := "x-api-key: 94332cabcdef57456582e5af2bfa123456789"
> }
Brilliant - thanks for your help!
Cheers,
Mark
On 24/07/2020, 11:20, "Freeradius-Users on behalf of Matthew Newton" \
<freeradius-users-bounces+mgrayson=cisco.com@lists.freeradius.org on behalf of \
mcn@freeradius.org> wrote:
On 23/07/2020 20:21, Mark Grayson (mgrayson) via Freeradius-Users wrote:
> So I set up rest config as
>
> post-auth {
> uri = "{$..connect_uri}/post"
> method = 'post'
> body = 'json'
> REST-HTTP-Header = "x-api-key: \
94332cabcdef57456582e5af2bfa123456789" > data = \
'{"end-user":"radius-test"}' > tls = ${..tls}
> }
REST-HTTP-Header is an attribute, not a config setting, so that isn't
the right place for it.
> Any idea what I'm doing wrong when trying to configure the x-api-key header?
update control {
&REST-HTTP-Header := "x-api-key: 94332cabcdef57456582e5af2bfa123456789"
}you need to set the attribute, e.g.
update control {
&REST-HTTP-Header := "x-api-key: 94332cabcdef57456582e5af2bfa123456789"
}
rest
See the notes in raddb/mods-available/rest about that attribute, notably
that it will be consumed after the rest call, so if you are making
multiple rest calls you'll need to set it each time (using a policy may
be the cleanest way to do this).
--
Matthew
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic