Flussonic Media Server documentation

How to configure two auth backends

If you are already using IPTV Middleware like IPTVportal, Stalker or anything else, you can meet a situation when you need to add some exceptions to authorization.

For example, you want to share a stream with your partner via a password-protected link but you do not want to modify Middleware code.

This document will show you how to solve this problem inside Flussonic Media Server by writing a small block in the configuration file.

Authorization backend with exceptions Anchor Anchor x2

We will assume that your Middleware has an auth backend script with the URL http://iptv.myservice.com/auth.php

You want to share the link to your stream with password PASS and to allow access from the local network 192.168.1.0/24.

Add these lines to the file /etc/flussonic/flussonic.conf:

auth_backend main {
  allow ip 192.168.1/24;
  allow token PASS;
  backend http://iptv.myservice.com/auth.php;
}

First we check the IP address and client token. If they do not fit, then we go to the original backend.

To use this authorization backend (main) for the stream, specify auth: // main:

stream cnn {
  url udp://239.255.0.1:1234;
  auth auth://main;
}

You can configure two different auth backends in the same manner.

Two auth backends Anchor Anchor x2

auth_backend parallel {
  backend http://DOMAIN.iptvportal.ru/auth/flussonic/arescrypt/;
  backend http://stalker/stalker_portal/server/api/chk_flussonic_tmp_link.php
}

stream cnn {
  url udp://239.255.0.1:1234;
  auth auth://parallel;
}

In this case, Flussonic carries out parallel authorization on several HTTP-backends.

See more about auth configurator.