Module: auth_token

Authorization Token

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

Generate an authorization token
Parameters:
Name Type Description
options authTokenOptions
Source:
Returns:
the authorization token
Type
string
Source:

Methods

(inner) escape_to_lower(url) → {string}

Escape url using lowercase hex code
Parameters:
Name Type Description
url string a url string
Source:
Returns:
escaped url
Type
string

Type Definitions

authTokenOptions

Auth token options
Type:
  • object
Properties:
Name Type Attributes Default Description
token_name string <optional>
"__cld_token__" The name of the token.
key string The secret key required to sign the token.
ip string The IP address of the client.
start_time number now The start time of the token in seconds from epoch.
expiration string The expiration time of the token in seconds from epoch.
duration string The duration of the token (from start_time).
acl string The ACL for the token.
url string The URL to authentication in case of a URL token.
Source: