Request
To get the public keys that are used to sign identity tokens, send a GET request to:
https://<host>:<port>/ias/operator/v1/keys/identitytoken
Headers
-
Authorization– Keycloak access token for a user with theoperatorRoleoradminRolerole (see Accessing operator APIs using Keycloak)
Mandatory arguments
None.
Other arguments
None.
Response
A successful request returns an HTTP 200 status. The response body contains the list of public keys, for example:
{
"keys": [
{
"key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----",
"kid": "3f1c9a7e5b2d4c8f9a6e1b7d2c4f8a90",
"current": true
}
]
}
Each key can have the following fields:
-
key– the public key, in PEM format (-----BEGIN PUBLIC KEY-----). It’s an RSA key, used with RS256. -
kid– the key ID. It matches thekidin the header of the identity tokens that the key signed. -
current–truefor the key that OpenTV Platform uses to sign new identity tokens,falsefor an older key. There is only one current key.
Older keys stay in the list until the tokens that they signed have expired, so that those tokens can still be validated.
An unauthorised request returns an HTTP 401 status – for example, if the access token is invalid or has expired, or isn’t a Keycloak access token.
A forbidden request returns an HTTP 403 status – for example, if the access token is missing or the user doesn’t have the operatorRole or adminRole role.
If identity tokens haven’t been set up, or haven’t been set up correctly, for the deployment, the request returns an HTTP 500 status ("errorCode": 8001 or "errorCode": 8002). Contact your NAGRAVISION representative.
See also
For full details of this API, see the Identity Authentication Service (IAS) API documentation.