Nature of the voucher database, is it possible to fetch vouchers from rolls
Is possible to access the pfsense voucher database externally? For ex. from an internal highly secured web page on a secured LAN, where I could fetch vouchers from rolls and automatically create qr codes from them? Making it more easy for visitiors to enter login in captive portal.
The idea is to fetch the voucher token, with custom info with url, for ex. https://captivelogin.mydomain.local/getVoucherFromRoll.php?rollid=1234
As stated in pfsense docs it should be possible to stear user to an url implmenting access for vouchers from pfsense, and there create an qr code, sending user to pre filled in authentication page with a fetched voucher from pfsense!?
Has enyone tried to do this?
Do one need to store vouchers locally from exported excel document, or is there any api to pfsense that can fetch vouchers from rolls?
Not a real API.
But ones a roll is created, you have the possibility to export it into an Excel or SCV file, ans this can be done as often as you want.
That is, this file file show you all the vouchers, the available ones, and the used ones.
There is another file to be parsed that lists the used vouchers.
Normally, you export the voucher rolls ones, and then you mark every vouchers as "used" as soon as you give one to someone. This marking can also be done automatically if you script things on your side.
The API is plain PHP code : just see how pfSense makes the voucher roll for you.
The create your own script based of that.
@Gertjan Okey, thanks. I will do that.