Table of Contents
This is used as follows
In your <head>
<script src="//cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js" integrity="sha512-a+SUDuwNzXDvz4XrIcXHuCf089/iJAoN4lmrXJg18XnduKK6YlDHNRalv4yd1N40OKI80tFidF+rqTFKGPoWFQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://rs.poms.omroep.nl/v1/npo-api/authentication.js"></script>
<script>
var npoAuthentication = new NpoApiAuthentication('${param.apiKey}', '${param.apiSecret}');
</script>
And then in javascript:
var params = {
max: maxResults,
schemes: 'names',
text: text
};
var suggestionHeaders = {
"x-origin": document.location.origin
};
var path = "thesaurus/concepts/"
npoAuthentication.addAuthorizationHeader(suggestionHeaders, path, params);
$http.get('/v1/api/' + path, {
params: params,
headers: suggestionHeaders
}).then(function (response) {
...