# cyberoam

> A JavaScript library for accessing cyberoam

Latest version **1.3.0** (published 2018-02-21) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install cyberoam
pnpm add cyberoam
yarn add cyberoam
bun add cyberoam
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2018-02-21 |
| First published | 2018-01-17 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 39.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Ujjwal Sharma |
| Maintainers | ryzokuken |

## Links

- npm: https://www.npmjs.com/package/cyberoam
- Repository: https://github.com/ryzokuken/cyberoam.js
- Homepage: https://github.com/ryzokuken/cyberoam.js#readme
- Issues: https://github.com/ryzokuken/cyberoam.js/issues
- npm.io page: https://npm.io/package/cyberoam

## Dependencies (2)

- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [request](https://npm.io/package/request.md) ^2.83.0

## Recent versions

- 1.3.0 (latest) — 2018-02-21
- 1.2.0 — 2018-02-08
- 1.1.3 — 2018-01-30
- 1.1.2 — 2018-01-18
- 1.1.1 — 2018-01-18
- 1.0.3 — 2018-01-18
- 1.0.1 — 2018-01-18
- 1.0.0 — 2018-01-17

## README

# cyberoam.js

A JavaScript library for accessing cyberoam

## Installation

```
$ npm install cyberoam --save
```

## Usage

```js
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"`

2. `liveURL: String`

  > The URL for the live page at cyberoam.

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

3. `loginMessage: String`

  > The message that is returned upon successful login.

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

4. `logoutMessage: String`

  > The message that is returned upon successful login.

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

5. `commonOptions: Object`

  > The common options that are passed to each call to the request function

  **Default Value**:

  ```json
    {
      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](https://ryzokuken.github.io)

---
_Source: https://npm.io/package/cyberoam · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
