Class: OAuth2Node

OAuth2Node(config)

Class representing an OAuth2 Node.

Constructor

new OAuth2Node(config)

Create an OAuth2Node.
Parameters:
Name Type Description
config Object Node configuration object.
Source:

Methods

cleanForm(form) → {Object}

Cleans form data by removing undefined or empty values.
Parameters:
Name Type Description
form Object The form data.
Source:
Returns:
- The cleaned form data.
Type
Object

configureProxy()

Configures proxy settings.
Source:

generateOptions(msg) → {Object}

Generates options for the HTTP request.
Parameters:
Name Type Description
msg Object Input message object.
Source:
Returns:
- The request options.
Type
Object

handleError(error, msg, send)

Handles errors from the POST request.
Parameters:
Name Type Description
error Object The error object.
msg Object Input message object.
send function Function to send messages.
Source:

handleResponse(response, msg, send)

Handles the response from the POST request.
Parameters:
Name Type Description
response Object The response object.
msg Object Input message object.
send function Function to send messages.
Source:

(async) makePostRequest(options) → {Promise.<Object>}

Makes a POST request.
Parameters:
Name Type Description
options Object The request options.
Source:
Returns:
- The response from the request.
Type
Promise.<Object>

(async) onInput(msg, send, done)

Handles input messages.
Parameters:
Name Type Description
msg Object Input message object.
send function Function to send messages.
done function Function to indicate processing is complete.
Source:

setStatus(color, text)

Sets the status of the node.
Parameters:
Name Type Description
color string The color of the status indicator.
text string The status text.
Source: