SimplifyJWS Class
This module exposes the different domain object on which different API calls can be invoked upon.
Methods
decodeSignature
(
Object
-
signature
Function to decode a JWS signature.
Parameters:
-
signature
StringThe JSON Web Signature to decode
Returns:
Object:
Returns a decoded JWS object
getJWSSignature
(
Object
-
auth
-
params
-
uri
Function to get the JWS Signature for our API call.
Parameters:
-
auth
ObjectAn object containing the public & private API keys
-
params
ObjectThe request paramaters to be used in the payload
-
uri
StringThe JSON Web Signature to decode
Returns:
Object:
Returns a JWS object
isJWSHeaderValid
(
Boolean
-
header
-
publicKey
-
url
-
callback
Function to check if a JWS header is valid or not.
Parameters:
-
header
StringThe JSON Web Signature header
-
publicKey
StringThe user's public API key
-
url
StringThe url which was used as a header in the JWS object
-
callback
FunctionA callback function to handle an errors
Returns:
Boolean:
Returns true if the JWS header values are set correctly
Properties
HEADERS
Object
An object containing the JWS header properties.