# sso-accesstrade

> SSO Authentication AccessTrade

Latest version **1.0.3** (published 2020-05-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install sso-accesstrade
pnpm add sso-accesstrade
yarn add sso-accesstrade
bun add sso-accesstrade
```

## 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.0.3 |
| Published | 2020-05-08 |
| First published | 2020-05-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | LTT |
| Maintainers | immortals2512 |

## Links

- npm: https://www.npmjs.com/package/sso-accesstrade
- npm.io page: https://npm.io/package/sso-accesstrade

## Dependencies (1)

- [simple-oauth2](https://npm.io/package/simple-oauth2.md) ^3.4.0

## Recent versions

- 1.0.3 (latest) — 2020-05-08
- 1.0.2 — 2020-05-08
- 1.0.1 — 2020-05-08
- 1.0.0 — 2020-05-08

## README

# Access-Trade OAuth2

[![NPM Package Version](https://img.shields.io/npm/v/sso-accesstrade.svg?style=flat-square)](https://www.npmjs.com/package/sso-accesstrade)

Node.js client library for [OAuth2](http://oauth.net/2/). OAuth2 Accesstrade allows users to grant access to restricted resources by third party applications.

## Usage

Install the client library using [npm](http://npmjs.org/):

```bash
npm install --save sso-accesstrade
```

Create a new instance by specifying the minimal configuration

```javascript
import { OAuth2AccessTrade } from 'sso-accesstrade'

const OAuth2AT = new OAuth2AccessTrade( cliendId, secret, domain, pathToken, pathAuthorization, redirect_uri? )
```
- `cliendId`: Service registered client id. Required
- `secret`: Service registered client secret. Required
- `domain`: Base URL used to obtain access tokens. Required. Example: `http://domain.com`
- `tokenPath`: URL path to obtain access tokens. Defaults to /oauth/token
- `authorizePath`:  URL path to request an authorization code. Defaults to /oauth/authorize
### OAuth2 Access-Trade Supported Functions

####  Grant_type password

```javascript
const token = await OAuth2AT.getTokenGrantTypePassword(username, password, scope)

// Token response:
/**
* { access_token: '1ade83d8-d07d-4c96-a8bf-14f492110bc0',
    token_type: 'bearer',
    refresh_token: '50fa1cdc-96f2-4848-b1b7-48c5555dc0fd',
    expires_in: 1547,
    scope: 'user_info' }
*/
```
## License

SSO AccessTrade 1.0

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