Authentication
The authentication service is used to create auth_tokens
which can be used to connect to the Secure Stream Recording Service. Three endpoints exist, which assign different permissions to the new auth_token
.
Client-Session Auth Request
Use the master-key to create a new auth_token
for a new or existing client.
POST /auth_v2/client
client_id
Type: STRING
(required)
ClientID tied to this token. The clientID can be freely chosen.
master_key
Type: STRING
(required)
Master key of this account.
token_ttl_s
Type: INT
(optional)
Default: 86400 (i.e. 24h)
TTL of the token in seconds.
Example request:
{
"master_key": "******",
"client_id": "c-0",
"token_ttl_s": 3600
}
Returns 201
on success.
Response Parameters
auth_token
Type: STRING
(required)
A JWT auth token.
Example response:
{
"auth_token": "********"
}
Supervisor Auth Request Parameters
A supervisor is monitoring a client-id. In order to create a token for that purpose, the client-id to be monitored hast to be supplied.
POST /auth_v2/supervisor
client_id
Type: STRING
(required)
ClientID (=SupervisorID) tied to this token. The clientID can be freely chosen.
master_key
Type: STRING
(required)
Master key of this account.
client_to_monitor
Type: STRING
(required)
ClientID of the client to be monitored.
token_ttl_s
Type: INT
(optional)
Default: 86400 (i.e. 24h)
TTL of the token in seconds.
Example request:
{
"master_key": "******",
"client_id": "s-0",
"client_to_monitor": "c1",
"token_ttl_s": 3600
}
Returns 201 on success.
Response Parameters
auth_token
Type: STRING
(required)
A JWT auth token.
Example response:
{
"auth_token": "********"
}
Stats Interface Auth Request
POST /auth_v2/stats
client_id
Type: STRING
(required)
ClientID tied to this token. The clientID can be freely chosen.
master_key
Type: STRING
(required)
Master key of this account.
token_ttl_s
Type: INT
(optional)
Default: 86400 (i.e. 24h)
TTL of the token in seconds.
Example request:
{
"master_key": "******",
"client_id": "c-0",
"token_ttl_s": 3600
}
Returns 201 on success.
Response Parameters
auth_token
Type: STRING
(required)
A JWT auth token.
Example response:
{
"auth_token": "********"
}
Using the token
The token is to be used via authorization header or carried via query param auth_token:
curl -H "Authorization: Bearer <token>" http://streamrec.eyeson.com/session
or
curl http://streamrec.eyeson.com/session?auth_token=<token>