cyberoam
v1.3.0
Published
A JavaScript library for accessing cyberoam
Downloads
4
Readme
cyberoam.js
A JavaScript library for accessing cyberoam
Installation
$ npm install cyberoam --save
Usage
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: String
The URL for the login/logout page at cyberoam.
Default Value: "http://172.16.68.6:8090/login.xml"
liveURL: String
The URL for the live page at cyberoam.
Default Value: "http://172.16.68.6:8090/live"
loginMessage: String
The message that is returned upon successful login.
Default Value: "You have successfully logged into JIIT Internet Server.
logoutMessage: String
The message that is returned upon successful login.
Default Value: "You have successfully logged off from JIIT Internet Server."
commonOptions: Object
The 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 install
License
GPL-3.0 © Ujjwal Sharma