Class: ChannelAuth

ChannelAuth(base, username, password, optionsopt)

Authentication class for use with channel requests.

Constructor

new ChannelAuth(base, username, password, optionsopt)

Parameters:
Name Type Attributes Description
base String

Base URL to forward authentication requests to.

username String

User name to supply for request authentication.

password String

Password to supply for request authentication.

options Object <optional>

Additional options to supply for request authentication.

Properties
Name Type Attributes Default Description
key String <optional>

Optional client private keys in PEM format. See https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options.

cert String <optional>

Optional client cert chains in PEM format. See https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options.

ca String <optional>

Optionally override the trusted CA certificates used to validate the authentication server. Any string can contain multiple PEM CAs concatenated together. See https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options.

passphrase String <optional>

Optional shared passphrase used for a single private key. See https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options.

rejectUnauthorized Boolean <optional>
true

If not false, the server certificate is verified against the list of supplied CAs. See https://nodejs.org/api/tls.html#tls_tls_connect_options_callback.

checkServerIdentity function <optional>

A callback function to be used when checking the server's hostname against the certificate. See https://nodejs.org/api/tls.html#tls_tls_connect_options_callback.

Implements:
Source:

Methods

authenticate(requestOptions, callback)

Authenticate the user for an HTTP channel request. The supplied callback should be invoked with the results of the authentication attempt. See BaseChannelAuth~authCallback for more information on the content provided to the callback.

Parameters:
Name Type Description
requestOptions Object

Options included in the HTTP channel request.

callback BaseChannelAuth~authCallback

Callback function invoked with the results of the authentication attempt.

Implements:
Source:

reset()

Purge any credentials cached from a previous authentication.

Implements:
Source: