Class SpazOAuth
SpazOAuth
Defined in: spazauth.js.
Constructor Attributes | Constructor Name and Description |
---|---|
SpazOAuth(realm, options)
Construct a new OAuth authentication object. |
Method Attributes | Method Name and Description |
---|---|
authorize(username, password, onComplete)
Authorize access to the service by fetching an OAuth access token. |
|
load(pickle)
Load OAuth credentials from a serialized string |
|
save()
Save OAuth credentials to a serialized string |
|
setAccessToken(key, secret)
Set the access token |
|
signRequest(method, url, parameters)
Sign a HTTP request and return oAuth header |
Class Detail
SpazOAuth(realm, options)
Construct a new OAuth authentication object.
- Parameters:
- {string} realm
- {object} options
Method Detail
{boolean} authorize(username, password, onComplete)
Authorize access to the service by fetching an OAuth access token.
- Parameters:
- {string} username
- {string} password
- {function} onComplete Optional
- a callback to fire on complete. If this is set, the request is asynchronous
- Returns:
- {boolean} true if authorization successful, otherwise false