Module: lib/auth_token

Authorization Token
Source:

(require("lib/auth_token"))(options) → {string}

Generate an authorization token
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
key string the secret key required to sign the token
ip string <optional>
the IP address of the client
start_time number <optional>
now the start time of the token in seconds from epoch
expiration string <optional>
the expiration time of the token in seconds from epoch
duration string <optional>
the duration of the token (from start_time)
acl string <optional>
the ACL for the token
url string <optional>
the URL to authentication in case of a URL token
Source:
Returns:
the authorization token
Type
string