Module: caf_security/utils

Utility methods for security.

Source:

Methods

accountsSession(accountsopt, accountsURL, closeF, cb)

Creates a session with the accounts service.

Parameters:
Name Type Attributes Description
accounts Object <optional>

An optional already negotiated session.

accountsURL string

The url for the accounts service.

closeF function

A function of type function(error=) to notify when the session closed, and whether there was an error.

cb cbType

A callback to return the session with the accounts service.

Source:

loadKey(dir, fileName, cb)

Loads a key from a file.

Parameters:
Name Type Description
dir string

A directory.

fileName string

The name of a key file.

cb cbType

A callback to return the contents of the file or an error.

Source: