Simplify Node.js API Docs

API Docs for:
Show:

SimplifyJWS Class

Defined in: lib/simplifyJws.js:28

This module exposes the different domain object on which different API calls can be invoked upon.

Methods

decodeSignature

(
  • signature
)
Object

Function to decode a JWS signature.

Parameters:

  • signature String

    The JSON Web Signature to decode

Returns:

Object:

Returns a decoded JWS object

getJWSSignature

(
  • auth
  • params
  • uri
)
Object

Function to get the JWS Signature for our API call.

Parameters:

  • auth Object

    An object containing the public & private API keys

  • params Object

    The request paramaters to be used in the payload

  • uri String

    The JSON Web Signature to decode

Returns:

Object:

Returns a JWS object

isJWSHeaderValid

(
  • header
  • publicKey
  • url
  • callback
)
Boolean

Function to check if a JWS header is valid or not.

Parameters:

  • header String

    The JSON Web Signature header

  • publicKey String

    The user's public API key

  • url String

    The url which was used as a header in the JWS object

  • callback Function

    A 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.