cyberoam v1.3.0
cyberoam.js
A JavaScript library for accessing cyberoam
Installation
$ npm install cyberoam --saveUsage
const Cyberoam = require('cyberoam');
// For information about the object, see the "options" section below
const options = { ... };
const cyberoam = new Cyberoam(options);
cyberoam.login(username, password)
.then(() => { ... })
.catch((errorMessage) => { ... });
cyberoam.logout(username)
.then(() => { ... })
.catch((errorMessage) => { ... });
// You don't really want to do anything if it's already live
cyberoam.checkLiveStatus(username)
.catch(() => { ... });Options
You may wish to provide any of the following options when creating an object of type Cyberoam. Any options skipped out will be replaced by their respective default values.
loginURL: StringThe URL for the login/logout page at cyberoam.
Default Value:
"http://172.16.68.6:8090/login.xml"liveURL: StringThe URL for the live page at cyberoam.
Default Value:
"http://172.16.68.6:8090/live"loginMessage: StringThe message that is returned upon successful login.
Default Value:
"You have successfully logged into JIIT Internet Server.logoutMessage: StringThe message that is returned upon successful login.
Default Value:
"You have successfully logged off from JIIT Internet Server."commonOptions: ObjectThe common options that are passed to each call to the request function
Default Value:
{ timeout: 1000 }
Setup (for contributors)
$ git clone https://github.com/ryzokuken/cyberoam.js.git
$ cd cyberoam.js
$ npm installLicense
GPL-3.0 © Ujjwal Sharma