0.0.32 • Published 9 years ago

eden-oauth v0.0.32

Weekly downloads
60
License
-
Repository
github
Last release
9 years ago

#OAUTH v1.1

DESCRIPTION

Build Status

General

Installation

npm install eden-oauth

Usage

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

Methods


getAuthorization

 string getAuthorization(String);

Returns the authorization header string

Parameters

  1. string

Returns

string

Example

Code
oauth().getAuthorization();
Outputs
RESULTS

getHmacPlainTextSignature

 string getHmacPlainTextSignature();

Returns the signature

Parameters

Returns

string

Example

Code
oauth().getHmacPlainTextSignature();
Outputs
RESULTS

getHmacSha1Signature

 string getHmacSha1Signature(Array);

Returns the signature

Parameters

  1. array

Returns

string

Example

Code
oauth().getHmacSha1Signature();
Outputs
RESULTS

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

jsonEncodeQuery

 this jsonEncodeQuery();

When sent, sends the parameters as post fields

Parameters

Returns

this

Example

Code
oauth().jsonEncodeQuery();
Outputs
RESULTS

getResponse

 array getResponse(Array);

Returns the token from the server

Parameters

  1. array

Returns

array

Example

Code
oauth().getResponse();
Outputs
RESULTS

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

setHeaders

 this setHeaders(Array|string);

Sets request headers

Parameters

  1. array|string

Returns

this

Example

Code
oauth().setHeaders();
Outputs
RESULTS

setMethodToGet

 this setMethodToGet();

When sent, appends the parameters to the URL

Parameters

Returns

this

Example

Code
oauth().setMethodToGet();
Outputs
RESULTS

setMethodToDelete

 this setMethodToDelete();

When sent, appends the parameters to the URL

Parameters

Returns

this

Example

Code
oauth().setMethodToDelete();
Outputs
RESULTS

setMethodToPost

 this setMethodToPost();

When sent, sends the parameters as post fields

Parameters

Returns

this

Example

Code
oauth().setMethodToPost();
Outputs
RESULTS

setRealm

 this setRealm(String);

Some Oauth servers requires a realm to be set

Parameters

  1. string

Returns

this

Example

Code
oauth().setRealm();
Outputs
RESULTS

setSignatureToHmacSha1

 this setSignatureToHmacSha1();

Sets the signature encryption type to HMAC-SHA1

Parameters

Returns

this

Example

Code
oauth().setSignatureToHmacSha1();
Outputs
RESULTS

setSignatureToRsaSha1

 this setSignatureToRsaSha1();

Sets the signature encryption to RSA-SHA1

Parameters

Returns

this

Example

Code
oauth().setSignatureToRsaSha1();
Outputs
RESULTS

setSignatureToPlainText

 this setSignatureToPlainText();

Sets the signature encryption to PLAINTEXT

Parameters

Returns

this

Example

Code
oauth().setSignatureToPlainText();
Outputs
RESULTS

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

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

useAuthorization

 this useAuthorization(Bool);

When sent, appends the authroization to the headers

Parameters

  1. bool

Returns

this

Example

Code
oauth().useAuthorization();
Outputs
RESULTS
0.0.32

9 years ago

0.0.31

9 years ago

0.0.28

10 years ago

0.0.27

10 years ago

0.0.26

10 years ago

0.0.25

10 years ago

0.0.24

10 years ago

0.0.23

10 years ago

0.0.21

10 years ago

0.0.2-0.2

10 years ago

0.0.20

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.12

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago