Skip to content
/ cpa.js Public

This project contains reference implementations of Cross-Platform Authentication client library. (ETSI TS 103 407)

License

Notifications You must be signed in to change notification settings

ebu/cpa.js

Repository files navigation

cpa.js

Build Status

This project contains a library which implements the Cross-Platform Authentication protocol for Clients and is provided and maintained as reference implementation.

This software implements version 1.0 of the Cross-Platform Authentication Protocol (ETSI TS 103 407).

More information on Cross-Platform Authentication: EBU Tech

Usage

Installation with Bower

Bower is a package manager for the web.

bower install cpa.js

RequireJS

You can use RequireJS in order to include the cpa.js library.

HTML:

<script data-main="js/main" src="require.js"></script>

js/main.js

require.config({
  baseUrl: 'js',
  paths: {
    'cpa': '../bower_components/cpa.js/dist/cpa.min'
  }
});

require(['cpa'], function(cpa) {
  cpa.device.registerClient('http://local.ebu.io:8001/', '1', '2', '3',
    function(err, info) {
      console.log(err, info);
    });
});

Stand-alone

You can use the cpa.js library directly in the HTML page:

<script src="cpa.js"></script>

The cpa object is used to expose the library:

<script>
   cpa.device.registerClient('http://local.ebu.io:8001/', '1', '2', '3',
     function(err, info) {
       console.log(err, info);
     });
</script>

Node.js

Install the cpa.js package using NPM:

npm install cpa.js

Use require to access within Node.js:

var cpa = require('cpa.js');

cpa.device.registerClient('http://local.ebu.io:8001/', '1', '2', '3',
     function(err, info) {
       console.log(err, info);
     });

Development

Build

npm install

bower install

grunt

Related Projects

Contributors

Copyright & License

Copyright (c) 2014-2016, EBU-UER Technology & Innovation

The code is under BSD (3-Clause) License. (see LICENSE.txt)

About

This project contains reference implementations of Cross-Platform Authentication client library. (ETSI TS 103 407)

Resources

License

Stars

Watchers

Forks

Packages

No packages published