# eden-oauth

> Eden Node JS OAUTH

Latest version **0.0.32** (published 2015-06-01) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install eden-oauth
pnpm add eden-oauth
yarn add eden-oauth
bun add eden-oauth
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.32 |
| Published | 2015-06-01 |
| First published | 2014-09-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christian Blanquera |
| Maintainers | cblanquera |
| Keywords | eden, library |

## Links

- npm: https://www.npmjs.com/package/eden-oauth
- Repository: https://github.com/edenjs/oauth
- Issues: https://github.com/edenjs/oauth/issues
- npm.io page: https://npm.io/package/eden-oauth

## Dependencies (6)

- [eden-hash](https://npm.io/package/eden-hash.md) 0.0.32
- [eden-rest](https://npm.io/package/eden-rest.md) 0.0.32
- [eden-time](https://npm.io/package/eden-time.md) 0.0.32
- [eden-array](https://npm.io/package/eden-array.md) 0.0.32
- [eden-class](https://npm.io/package/eden-class.md) 0.0.32
- [eden-string](https://npm.io/package/eden-string.md) 0.0.32

## Recent versions

- 0.0.32 (latest) — 2015-06-01
- 0.0.31 — 2014-11-28
- 0.0.28 — 2014-11-11
- 0.0.27 — 2014-11-11
- 0.0.26 — 2014-11-07
- 0.0.25 — 2014-11-06
- 0.0.24 — 2014-11-03
- 0.0.23 — 2014-10-17
- 0.0.21 — 2014-10-08
- 0.0.2-0.2 — 2014-10-08
- 0.0.20 — 2014-10-08
- 0.0.17 — 2014-10-02
- 0.0.16 — 2014-10-02
- 0.0.15 — 2014-10-01
- 0.0.14 — 2014-09-29
- … 3 more at https://npm.io/package/eden-oauth/versions

## README

#OAUTH v1.1

DESCRIPTION

[![Build Status](https://api.travis-ci.org/edenjs/oauth.png)](https://travis-ci.org/edenjs/oauth)

## General

### Installation

```
npm install eden-oauth
```

### Usage

```
var oauth = require('eden-oauth');
```

## Methods

  * [getAuthorization](#getAuthorization)

  * [getHmacPlainTextSignature](#getHmacPlainTextSignature)

  * [getHmacSha1Signature](#getHmacSha1Signature)

  * [getSignature](#getSignature)

  * [jsonEncodeQuery](#jsonEncodeQuery)

  * [getResponse](#getResponse)

  * [setCallback](#setCallback)

  * [setHeaders](#setHeaders)

  * [setMethodToGet](#setMethodToGet)

  * [setMethodToDelete](#setMethodToDelete)

  * [setMethodToPost](#setMethodToPost)

  * [setRealm](#setRealm)

  * [setSignatureToHmacSha1](#setSignatureToHmacSha1)

  * [setSignatureToRsaSha1](#setSignatureToRsaSha1)

  * [setSignatureToPlainText](#setSignatureToPlainText)

  * [setToken](#setToken)

  * [setVerifier](#setVerifier)

  * [useAuthorization](#useAuthorization)

---

<a name="getAuthorization"></a>

### getAuthorization

```
 string getAuthorization(String);
```

Returns the authorization header string

#### Parameters

  1. string

#### Returns

 string

#### Example

##### Code

```
oauth().getAuthorization();
```

##### Outputs

```
RESULTS
```

---

<a name="getHmacPlainTextSignature"></a>

### getHmacPlainTextSignature

```
 string getHmacPlainTextSignature();
```

Returns the signature

#### Parameters

#### Returns

 string

#### Example

##### Code

```
oauth().getHmacPlainTextSignature();
```

##### Outputs

```
RESULTS
```

---

<a name="getHmacSha1Signature"></a>

### getHmacSha1Signature

```
 string getHmacSha1Signature(Array);
```

Returns the signature

#### Parameters

  1. array

#### Returns

 string

#### Example

##### Code

```
oauth().getHmacSha1Signature();
```

##### Outputs

```
RESULTS
```

---

<a name="getSignature"></a>

### getSignature

```
 string getSignature(Array);
```

Returns the signature based on what signature method was set

#### Parameters

  1. array

#### Returns

 string

#### Example

##### Code

```
oauth().getSignature();
```

##### Outputs

```
RESULTS
```

---

<a name="jsonEncodeQuery"></a>

### jsonEncodeQuery

```
 this jsonEncodeQuery();
```

When sent, sends the parameters as post fields

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().jsonEncodeQuery();
```

##### Outputs

```
RESULTS
```

---

<a name="getResponse"></a>

### getResponse

```
 array getResponse(Array);
```

Returns the token from the server

#### Parameters

  1. array

#### Returns

 array

#### Example

##### Code

```
oauth().getResponse();
```

##### Outputs

```
RESULTS
```

---

<a name="setCallback"></a>

### setCallback

```
 this setCallback(String);
```

Sets the callback for authorization This should be set if wanting an access token

#### Parameters

  1. string

#### Returns

 this

#### Example

##### Code

```
oauth().setCallback();
```

##### Outputs

```
RESULTS
```

---

<a name="setHeaders"></a>

### setHeaders

```
 this setHeaders(Array|string);
```

Sets request headers

#### Parameters

  1. array|string

#### Returns

 this

#### Example

##### Code

```
oauth().setHeaders();
```

##### Outputs

```
RESULTS
```

---

<a name="setMethodToGet"></a>

### setMethodToGet

```
 this setMethodToGet();
```

When sent, appends the parameters to the URL

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().setMethodToGet();
```

##### Outputs

```
RESULTS
```

---

<a name="setMethodToDelete"></a>

### setMethodToDelete

```
 this setMethodToDelete();
```

When sent, appends the parameters to the URL

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().setMethodToDelete();
```

##### Outputs

```
RESULTS
```

---

<a name="setMethodToPost"></a>

### setMethodToPost

```
 this setMethodToPost();
```

When sent, sends the parameters as post fields

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().setMethodToPost();
```

##### Outputs

```
RESULTS
```

---

<a name="setRealm"></a>

### setRealm

```
 this setRealm(String);
```

Some Oauth servers requires a realm to be set

#### Parameters

  1. string

#### Returns

 this

#### Example

##### Code

```
oauth().setRealm();
```

##### Outputs

```
RESULTS
```

---

<a name="setSignatureToHmacSha1"></a>

### setSignatureToHmacSha1

```
 this setSignatureToHmacSha1();
```

Sets the signature encryption type to HMAC-SHA1

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().setSignatureToHmacSha1();
```

##### Outputs

```
RESULTS
```

---

<a name="setSignatureToRsaSha1"></a>

### setSignatureToRsaSha1

```
 this setSignatureToRsaSha1();
```

Sets the signature encryption to RSA-SHA1

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().setSignatureToRsaSha1();
```

##### Outputs

```
RESULTS
```

---

<a name="setSignatureToPlainText"></a>

### setSignatureToPlainText

```
 this setSignatureToPlainText();
```

Sets the signature encryption to PLAINTEXT

#### Parameters

#### Returns

 this

#### Example

##### Code

```
oauth().setSignatureToPlainText();
```

##### Outputs

```
RESULTS
```

---

<a name="setToken"></a>

### setToken

```
 this setToken(String, String);
```

Sets the request token and secret. This should be set if wanting an access token

#### Parameters

  1. string

  2. string

#### Returns

 this

#### Example

##### Code

```
oauth().setToken();
```

##### Outputs

```
RESULTS
```

---

<a name="setVerifier"></a>

### setVerifier

```
 this setVerifier(String);
```

Some Oauth servers requires a verifier to be set when retrieving an access token

#### Parameters

  1. string

#### Returns

 this

#### Example

##### Code

```
oauth().setVerifier();
```

##### Outputs

```
RESULTS
```

---

<a name="useAuthorization"></a>

### useAuthorization

```
 this useAuthorization(Bool);
```

When sent, appends the authroization to the headers

#### Parameters

  1. bool

#### Returns

 this

#### Example

##### Code

```
oauth().useAuthorization();
```

##### Outputs

```
RESULTS
```

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