# wso2is-wrapper

> Wrapper to integrate with WSO2 Identity Server APIs

Latest version **0.1.6** (published 2017-05-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install wso2is-wrapper
pnpm add wso2is-wrapper
yarn add wso2is-wrapper
bun add wso2is-wrapper
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2017-05-12 |
| First published | 2017-05-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rafael de Morais |
| Maintainers | rdemorais.freitas |
| Keywords | wso2, identity, server, is, nodejs |

## Links

- npm: https://www.npmjs.com/package/wso2is-wrapper
- Repository: https://github.com/rdemorais/wso2is-wrapper
- Homepage: https://github.com/rdemorais/wso2is-wrapper#readme
- Issues: https://github.com/rdemorais/wso2is-wrapper/issues
- npm.io page: https://npm.io/package/wso2is-wrapper

## Dependencies (3)

- [soap](https://npm.io/package/soap.md) ^0.19.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [node-rest-client](https://npm.io/package/node-rest-client.md) ^3.1.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.1.6 (latest) — 2017-05-12
- 0.1.5 — 2017-05-10
- 0.1.4 — 2017-05-10
- 0.1.3 — 2017-05-10

## README

# WSO2 Identity Server Wrapper [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url]

This module aim to act as a wrapper to WSO2 Identity Server APIs.

### How to 

- In a terminal execute `npm install wso2is-wrapper --save`

- Open your favorite editor and type:

``` javascript
var config = {
    "protocol": "https",
    "host": "[HOST]",
    "port": "[PORT]",
    "basicAuth": "[BASE64 user:pass]",
    "clientId": "[CLIENT ID]",
    "client_secret": "[ClIENT SECRET]",
    "newUserEndpoint": "/api/identity/user/v0.9/me",
    "oauthTokenEndpoint": "/oauth2/token"
}

var wso2isWrapper = require('wso2is-wrapper')(config);
var addNewUser = wso2isWrapper.addNewUser;
var login = wso2isWrapper.login;

/*
* results = {
*   data: "[DATA FROM Identity Server]",
*   code: "[RESPONSE CODE]"    
* }

* add new user
*/
addNewUser(user)
    .then(function(results) {
        
    }).catch(function(err) {

    });
```

### Methods

#### login

To log into the system with credentials use this method. This one consider the password flow

``` json
{
    "username": "foo",
    "password": "123456"
}
```

#### addNewUser

Receives as parameter the user to be registered against IS. 

``` json
{
  "user": {
    "username": "foo",
    "realm": "PRIMARY",
    "password": "123456",
    "claims": [
      {
        "uri": "http://wso2.org/claims/givenname",
        "value": "foo"
      },
      {
        "uri": "http://wso2.org/claims/lastname",
        "value": "last"
      },
      {
        "uri": "http://wso2.org/claims/emailaddress",
        "value": "email@ee.com"
      },
      {
        "uri": "http://wso2.org/claims/mobile",
        "value": "12345"
      }
    ]
  },
  "properties": []
}
```

### Roadmap 

- Performe connection using WSO2Carbon certificate
- Error handle
- AdminForcePasswordReset
- Change password
- SAML connection for federate login

[npm-url]: https://npmjs.org/package/wso2is-wrapper
[npm-image]: https://img.shields.io/npm/v/wso2is-wrapper.svg

[downloads-image]: https://img.shields.io/npm/dm/wso2is-wrapper.svg

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