Backend server for the Keyholder project
- Node.JS
- Redis server
git clone https://github.com/sunsay/keyholder-server.git
cd keyholder-server
npm install
npm start
-
JWT_SECRET - String used to sign jwt tokens / REQUIRED
-
PORT [3000] - Keyholder Server port
-
SSL_PORT [3443] - Keyholder Server port (SSL)
-
SSL_PRIVATE_KEY [null] - SSL Private Key
-
SSL_CERTIFICATE [null] - SSL Certificate
-
REDIS_HOST [localhost] - Redis server host
-
REDIS_PORT [6379] - Redis server port
Simple key-value server for storing encrypted data
Requests should have application/x-www-form-urlencoded
content type.
Register new account
Parameters
- login
- secret
- data (Optional)
Response
{
"token": "<JWT_TOKEN>",
"data": "<DATA>" or null
}
Log in to the system
Parameters
- login
- secret
Response
{
"token": "<JWT_TOKEN>",
"data": "<DATA>" or null
}
Get storage for the logged in user.
You should add Authorization header with token which was received on sign up or sign in step to the request.
Authorization: Bearer <JWT_TOKEN>
Response
<DATA>
Update storage data for the logged in user.
You should add Authorization header with token which was received on sign up or sign in step to the request.
Authorization: Bearer <JWT_TOKEN>
Parameters
- data