First time and n-th time sign on
A client device has first time and n-th time login states on the OPF platform. First time and n-th are determined by the presence of the device created linked to the account on OPF. During the first time sign-on, device information is sent for registration on a specific account. The following values determine the information being sent per platform.
If as part of the sign-on, the same deviceInformation
is sent again, a brand new device will be created even though it is the same physical device.
Block | Key | STB OOS | STB Android | Desktop Chrome | Desktop Safari | Desktop Firefox | Desktop Edge | Mob Android | Tab Android | iPhone | iPad | fireTV | TVOS | XBOX | ROKU |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deviceInformation. securePlayer | Codecs | ||||||||||||||
Streaming | |||||||||||||||
DRM | |||||||||||||||
deviceInformation. device.screen | Height | * | * | * | * | * | * | * | * | * | * | * | * | * | * |
Width | * | * | * | * | * | * | * | * | * | * | * | * | * | * | |
Density | * | * | * | * | * | * | * | * | * | * | * | * | * | * | |
deviceInformation. device.hardware | Model | * | * | * | * | * | * | * | * | * | * | * | * | * | * |
Manufacturer | * | * | * | * | * | * | * | * | * | * | * | * | * | * | |
Type | STB | STB | Browser | Browser | Browser | Browser | Mobile | Tablet | Mobile | Tablet | fireTV | Apple TV | XBox | Roku | |
deviceInformation. device.OS | Type | OpenTV OS | Android | * Ex. Windows 7 Enterprise, Mac, Linux | * Ex. Windows 7 Enterprise, Mac, Linux | * Ex. Windows 7 Enterprise, Mac, Linux | * Ex. Windows 7 Enterprise, Mac, Linux | Android | Android | iOS | iOS | * | TVOS | Windows 10 | Roku OS |
Version | * {X.Y.Z} | * | * | * | * | * | * | * | * | * | * | * | * | * | |
deviceinformation. deviceType | MANAGED | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | OPEN | |
deviceinformation. | N/A | N/A | ** | ** | ** | ** | ** | ** | ** | ** | ** | ** | ** | ** | |
* As provided by the system. ** As defined by operator. This should be one of the device classes defined in OpCon's Device specific products screen. |
An example of a first-time sign-on POST payload is shown below.
{
"deviceInformation": {
"securePlayer":{
"streamings":[
"H264"
],
"DRMs":[
"SSP"
],
"codecs":[
"H264"
]
},
"playoutDeviceClass": "mobileDevice",
"device":{
"OS":{
"type":"Windows",
"version":"NT 4.0"
},
"screen":{
"width":489,
"height":969
},
"hardware":{
"type":"Browser"
}
}
}
}
On successful sign-on, the device is automatically created by the information provided and the following JSON response would be received.
{
"refresh_token":"eyJraWQiOiIyOTI4NDgiLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXIiOiIxLjAiLCJ0ZW5hbnRJZCI6Im5hZ3JhIiwiYWNjb3VudElkIjoiNWNkM2Y2Y2FiMjI2MzcwMDAxMzc5NjJkIiwiZXhwIjoxNTU3NTY3OTc2LCJkZXZpY2VJZCI6IjVjZDNmNmU4YjIyNjM3MDAwMTM3OTYyZiIsImZpeGVkX2V4cCI6MTU1OTk4NzE3NiwianRpIjoiNDc4OTAyMzQyMzcxNDA4OTQ3OCIsInVzZXJJZCI6IkRFU0s5NSIsInR5cCI6IlJlZnJlc2hBdXRoTiJ9.Yz_qxcyFloB332sKULFCvWLTn0uZgXCbX8V0sQtNMK4",
"access_token":"eyJraWQiOiIyOTI4NDgiLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXIiOiIxLjAiLCJ0ZW5hbnRJZCI6Im5hZ3JhIiwiZ2VvQmxvY2tFeGVtcHQiOmZhbHNlLCJzZXNzaW9uQ29udHJvbCI6eyJtYXhTZXNzaW9ucyI6Mywic2Vzc2lvbkNvbnRyb2xFbmFibGVkIjpmYWxzZX0sImFjY291bnRJZCI6IjVjZDNmNmNhYjIyNjM3MDAwMTM3OTYyZCIsImV4cCI6MTU1NzM5ODc3NiwiZGV2aWNlSWQiOiI1Y2QzZjZlOGIyMjYzNzAwMDEzNzk2MmYiLCJmaXhlZF9leHAiOjE1NTk5ODcxNzYsImp0aSI6IjQ3ODkwMjM0MjM3MTQwODk0NzgiLCJ1c2VySWQiOiJERVNLOTUiLCJ0eXAiOiJEZXZBdXRoTiJ9._wXH28q7NhBtuHE05X_TcvapTvfgiClgHR1Fs_Ucw8I",
"client_id":"5cd3f6e8b22637000137962f",
"fixed_refresh_expires_in":2592000,
"accountId":"5cd3f6cab22637000137962d",
"refresh_expires_in":172800,
"expires_in":3600,
"token_type":"bearer"
}
The client_id value is saved in the client local storage for n-th sign-on cases. The client_id value will be wiped out where a user sign-on is being swapped with the one currently in use. An example is shown below.
{"message":"Unauthorized"}