Skip to main content

How to authenticate when calling a 3rd party web service in the URL header

Written by Ian Maison

Scenario:

Customer wanted to be able to use dynamic urls (at the time it was not standard, but developed only for this customer before 2.0.9 which are used by giving information in the Player Properties and also in the Feed Manager (Variables)

For example: You want to display with only one url, which will be used in a Generic template, showing all weather information of Canada.

This same template will be played by 5 players located in 5 different locations.

  • 01: Montreal

  • 02: Quebec

  • 03: Toronto

  • 04 : Ottawa

  • 05 : Victoria

In player 1 : in player properties > Variables we will type Montreal in the first value

In player 2 : in player properties > Variables we will type Quebec in the first value

....In player 5 : in player properties > Variables we will type Victoria in the first value

In the Data Feed Manager, accessed via Templates, lets suppose that the weather url link looks like this :

https://weather.gc.ca/xml/location?Montreal => will give you xml feed for Montreal weather.

So in the Feed manager instead of typing the full url, we will type : https://weather.gc.ca/xml/location?[1]

[1] corresponds to the first value in each of the player properties dynamic value datagrid., hence for the first player it will be switched with “Montreal “, for the second player it will be switched with value “Quebec†etc….

Now the customer, wants to add a security layer, in order to be sure that only certain “identified†players could request

QL Manager/Player are now able to manage specific headers for identification purposes. Add this header in the Feed Manager URL, so once retrieved by the player, the player will use it in its own header before requesting the XML. Which means that any other device that will try to access the xml without this header will be rejected.

In the manager, it could be represented this way :

The header is to be defined by the customer. And must be enter between {}.

Did this answer your question?