cyberoam

1.3.0 • Public • Published

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.

  1. loginURL: String

The URL for the login/logout page at cyberoam.

Default Value: "http://172.16.68.6:8090/login.xml"

  1. liveURL: String

The URL for the live page at cyberoam.

Default Value: "http://172.16.68.6:8090/live"

  1. loginMessage: String

The message that is returned upon successful login.

Default Value: "You have successfully logged into JIIT Internet Server.

  1. logoutMessage: String

The message that is returned upon successful login.

Default Value: "You have successfully logged off from JIIT Internet Server."

  1. 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

Readme

Keywords

none

Package Sidebar

Install

npm i cyberoam

Weekly Downloads

8

Version

1.3.0

License

GPL-3.0

Unpacked Size

40.3 kB

Total Files

5

Last publish

Collaborators

  • ryzokuken