eden-oauth v0.0.32
#OAUTH v1.1
DESCRIPTION
General
Installation
npm install eden-oauthUsage
var oauth = require('eden-oauth');Methods
getAuthorization
string getAuthorization(String);Returns the authorization header string
Parameters
- string
Returns
string
Example
Code
oauth().getAuthorization();Outputs
RESULTSgetHmacPlainTextSignature
string getHmacPlainTextSignature();Returns the signature
Parameters
Returns
string
Example
Code
oauth().getHmacPlainTextSignature();Outputs
RESULTSgetHmacSha1Signature
string getHmacSha1Signature(Array);Returns the signature
Parameters
- array
Returns
string
Example
Code
oauth().getHmacSha1Signature();Outputs
RESULTSgetSignature
string getSignature(Array);Returns the signature based on what signature method was set
Parameters
- array
Returns
string
Example
Code
oauth().getSignature();Outputs
RESULTSjsonEncodeQuery
this jsonEncodeQuery();When sent, sends the parameters as post fields
Parameters
Returns
this
Example
Code
oauth().jsonEncodeQuery();Outputs
RESULTSgetResponse
array getResponse(Array);Returns the token from the server
Parameters
- array
Returns
array
Example
Code
oauth().getResponse();Outputs
RESULTSsetCallback
this setCallback(String);Sets the callback for authorization This should be set if wanting an access token
Parameters
- string
Returns
this
Example
Code
oauth().setCallback();Outputs
RESULTSsetHeaders
this setHeaders(Array|string);Sets request headers
Parameters
- array|string
Returns
this
Example
Code
oauth().setHeaders();Outputs
RESULTSsetMethodToGet
this setMethodToGet();When sent, appends the parameters to the URL
Parameters
Returns
this
Example
Code
oauth().setMethodToGet();Outputs
RESULTSsetMethodToDelete
this setMethodToDelete();When sent, appends the parameters to the URL
Parameters
Returns
this
Example
Code
oauth().setMethodToDelete();Outputs
RESULTSsetMethodToPost
this setMethodToPost();When sent, sends the parameters as post fields
Parameters
Returns
this
Example
Code
oauth().setMethodToPost();Outputs
RESULTSsetRealm
this setRealm(String);Some Oauth servers requires a realm to be set
Parameters
- string
Returns
this
Example
Code
oauth().setRealm();Outputs
RESULTSsetSignatureToHmacSha1
this setSignatureToHmacSha1();Sets the signature encryption type to HMAC-SHA1
Parameters
Returns
this
Example
Code
oauth().setSignatureToHmacSha1();Outputs
RESULTSsetSignatureToRsaSha1
this setSignatureToRsaSha1();Sets the signature encryption to RSA-SHA1
Parameters
Returns
this
Example
Code
oauth().setSignatureToRsaSha1();Outputs
RESULTSsetSignatureToPlainText
this setSignatureToPlainText();Sets the signature encryption to PLAINTEXT
Parameters
Returns
this
Example
Code
oauth().setSignatureToPlainText();Outputs
RESULTSsetToken
this setToken(String, String);Sets the request token and secret. This should be set if wanting an access token
Parameters
string
string
Returns
this
Example
Code
oauth().setToken();Outputs
RESULTSsetVerifier
this setVerifier(String);Some Oauth servers requires a verifier to be set when retrieving an access token
Parameters
- string
Returns
this
Example
Code
oauth().setVerifier();Outputs
RESULTSuseAuthorization
this useAuthorization(Bool);When sent, appends the authroization to the headers
Parameters
- bool
Returns
this
Example
Code
oauth().useAuthorization();Outputs
RESULTS10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
