API Docs for: 2.6
Show:

server_com_authentication_rest Class

Provides the HTTPS REST server.

Methods

config

(
  • path
)

Configurates the REST server properties by a configuration file. The file must use the JSON syntax.

The method can throw an Exception.

Parameters:

  • path String

    The path of the configuration file

execute

() private

Executed by all REST request. It calls the appropriate REST plugin function.

setAllRestPluginsLogger

(
  • log
)
private

Call setLogger function for all REST plugins.

Parameters:

  • log Object

    The logger object.

setCompAuthentication

(
  • compAuthentication
)
static

Set the authentication architect component to be used by REST plugins.

Parameters:

  • compAuthentication Object

    The architect authentication component

setCompUser

(
  • comp
)
static

Set the user architect component to be used by REST plugins.

Parameters:

  • comp Object

    The user component

setCompUtil

(
  • comp
)
static

Set the utility architect component to be used by REST plugins.

Parameters:

  • comp Object

    The architect utility component

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

start

() static

Start the HTTPS REST server.

Properties

address

String private

Listening address of the HTTPS REST server.

Default: "localhost"

HTTPS_CERT

String private

The path of the certificate to be used by HTTPS server.

Default: "/etc/pki/tls/certs/localhost.crt"

HTTPS_KEY

String private

The path of key to be used by HTTPS server.

Default: "/etc/pki/tls/private/localhost.key"

IDLOG

String private final

The module identifier used by the logger.

Default: [server_com_authentication_rest]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

port

String private

Listening port of the HTTPS REST server.

proto

String private

Listening protocol of the REST server, can be 'http' or 'https'.

Default: "http"

server

Object private

The HTTPS REST server.