Creates an access token
Generates an access token (44 random bytes) and saves a bcrypt hashed version for future lookup. The response contains a base58 encoded version of the random bytes token. If the ‘store’ option is set to false, the token is generated, but not stored in the local Cafe db. Alternatively, an existing token can be added using by specifying the ‘token’ option.
Use an existing token, rather than creating a new one
Whether to store the added/generated token to the local db (defaults to true)
New token as string
Retrieves information about all stored cafe tokens
Only really useful for debugging. These are hashed tokens, so are not valid.
Array of bcrypt hashed tokens
Removes an existing cafe token
Access token
Whether remove was successful
Check validity of existing cafe access token
Access token
Whether token is valid
Tokens is an API module for managing Cafe access tokens
Tokens allow other peers to register with a Cafe peer. Use this API to create, list, validate, and remove tokens required for access to this Cafe.
API