secure-connection-module
v1.0.2
Published
a connection module to integrate A and B safely.
Downloads
4
Readme
secure-connection-module
前後端加解密用模組。
Related Repo
- 實作前後端模擬真實環境用POC: secure-env-poc
Getting Started
Installation
# Installation
$ npm install
# testing
$ npm run test
Usage
// Init with RSA-1024 public key API
const connection = await Connection.getInstance(url);
// Base get/delete
const userData = await connection.get(url);
// post/put with partial encryption
let postBody = { Account: 'test' ,Password: 'test' };
let postOption = { encrypt: ['Password'] }; //option style same as axios
const response = await connection.post(url, postBody, postOption);
//ppost/put with fully encryption
let postBody = { Account: 'test' ,Password: 'test' };
let postOption = { encrypt: 'all' }; //option style same as axios
const response = await connection.post(url, postBody, postOption);
Building
- using babel with babel-preset-minify
npm run dist
References
axios - 0.18.0
cryptico-js - 1.1.0
License
TODO
- [ ] add code testing coverage report
- [ ] add auto reporting after every test runs
- [ ] add github stickers for coverage and contributors
- [X] add build tools that could transform es6 to commonjs(to dist)