Flussonic Authorization Backend API (21.12.1)

Download OpenAPI specification:Download

This API describes how Flussonic streaming server connects to an external authorization backend to check if the user is allowed to access a stream or a VOD file.

This specification does not have any external dependencies and is designed to be as minimal, as possible for reducing needs of maintaining unneeded backward compatibility.

This API is designed to be implementable by third parties.

Authentication

bearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

auth

Request to auth backend

This method describes what Flussonic sends to an authorization backend and what it awaits as a response.

Authorizations:
query Parameters
name
required
string
Example: name=fake

Stream or VOD file name for this session.

proto
required
string
Example: proto=hls

Protocol for this session.

ip
required
string
Example: ip=10.77.0.150

IP address of the media client who initiated this session.

request_type
required
string
Enum: "new_session" "update_session"
Example: request_type=new_session

Is it a request for a new session or an update request.

The value new_session is used for a start of a new session and update_session - for an existing session.

request_number
required
integer <bytes>
Example: request_number=1

Counter of auth requests for this session, starting from 0.

session_id
required
string <uuid>
Example: session_id=6217fd62-16da-4206-9da9-0173d7552a14

Unique session id. It will be the same for one session.

stream_clients
required
integer
Example: stream_clients=1

How many clients are currently watching this stream or VOD file.

total_clients
required
integer
Example: total_clients=2

How many clients are currently watching from this server.

token
string
Example: token=60334b207baa

User provided authorization token.

The token is generated automatically or received from a website.

duration
integer <seconds>
Example: duration=2

If it is an update request, then it will be the duration of this session in seconds.

bytes
integer <bytes>
Example: bytes=12345

How many bytes have been passed in this session.

qs
string
Example: qs=token=60334b207baa

Here may go initial query string that was passed by client. Use it for additional authorization.

dvr
boolean
Example: dvr=true

Is it a session for playing DVR archive.

user_agent
string
Example: user_agent=curl%2F7.68.0

Many protocols can signal a user agent. It will be provided in this field.

referer
string
Example: referer=hey.com

Referer HTTP header that identifies the address of the web page from which the request was made.

Responses

Response samples

Content type
application/json
{
  • "config": {
    },
  • "ad_inject": {
    }
}