Module: auth

Handling authentication needs of the API.
Source:

Methods

(private, inner) addSignature(key, secret, uri, body) → {URIjs}

Add signature to URI instance for use in authenticating against the API. The request body will be stringified using JSON.stringify if its not a string.
Parameters:
Name Type Description
key String used to identify the client
secret String used to sign the request
uri URIjs an instance of URIjs
body * request body
Source:
Throws:
errors.AuthenticationRequiredError
Returns:
the same instance of URIjs
Type
URIjs

(inner) sign(key, secret, uri, body) → {URIjs}

Sign a URI instance. This is simply a wrapper around module:auth~addSignature that allows a timestamp to be added to the URI instance.
Parameters:
Name Type Description
key String key used to sign
secret String used to sign the request
uri URIjs an instance of URIjs
body * body to used in request
Source:
Throws:
errors.AuthenticationRequiredError
Returns:
same instance of URIjs
Type
URIjs