Token

auth~ Token

Class encapsulating an API authentication token.

Constructor

new Token(token)

Creates a new Token object with the given contents.

Parameters:
Name Type Description
token object

an object defining an API token

Source:

Methods

toString() → {string}

Generates a string representation of the Token.

Source:

getHeader() → {object}

Returns a header dictionary for authenticating requests with this token.

Source:

(static) fromDisk(path) → {Token}

Loads a token from disk.

Parameters:
Name Type Description
path string

the path to a valid token JSON file

Source: