Overview
An identity token is a short-lived token, signed by OpenTV Platform, that identifies the signed-in account and device. A client application can pass it to a third-party web application, such as the operator’s self-care portal, so that the user is signed in to it automatically. The web application’s back end checks the token itself, without calling OpenTV Platform – see Enabling single sign-on to a self-care portal.
The client application doesn’t need to read the token. It passes it to the web application as it is, in the way agreed with that web application (for example, as a query parameter in the URL or in a request header). For how OpenTV ION does this, see the Self-care portal integration guide in the OpenTV ION documentation.
Request
To get an identity token, send a GET request to:
https://<host>:<port>/ias/v1/identitytoken
Headers
-
Authorization– the client’s access token, as a bearer token (Bearer <access token>). This is theaccess_tokenthat the client gets when it signs in – see Authentication token.
Mandatory arguments
None. The request has no body.
Other arguments
None.
Response
A successful request returns an HTTP 200 status. The response body contains the identity token and when it expires, for example:
{
"identityToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjNmMWM5YTdlNWIyZDRjOGY5YTZlMWI3ZDJjNGY4YTkwIn0.eyJzdWIiOiI2YWYxZGIyNDIzMWIzZGNjODgyNjUz...",
"expiry": 1794502038
}
-
identityToken– the identity token, as a JWT signed with RS256 -
expiry– when the identity token expires, in seconds since the Unix epoch. This is the same as the token’sexpclaim.
An identity token is valid for a short time (by default, five minutes, but this can vary by deployment). It can’t be refreshed – when it has expired, request a new one. Each request returns a new token.
A forbidden request returns an HTTP 403 status – for example, if the access token is missing, invalid, or has expired.
If OpenTV Platform can’t issue an identity token, the request returns an HTTP 500 status:
-
"errorCode": 8001or"errorCode": 8002– identity tokens aren’t set up, or aren’t set up correctly, for this deployment. Contact your NAGRAVISION representative. -
"errorCode": 8003– the identity token couldn’t be signed. Either the deployment’s signing key has a problem (contact your NAGRAVISION representative), or the access token doesn’t include an account, tenant and device ID.
See also
For full details of this API, see the Identity Authentication Service (IAS) API documentation.
-
Enabling single sign-on to a self-care portal (Subscriber management integration guide)