Library to helper solinftec-auth-api use.
npm i solinftec-auth-lib --save
import Auth from 'solinftec-auth-lib'
let helper = new Auth();
helper.setOrigin('node');
// **optional
// helper.setUrl('base_url');
let form = {
"email":"email",
"password":"password"
};
helper.getBlockchainToken(form, 'base_url'**optional)
.then(token => console.log(token));
helper.checkBlockchainToken('hash-token', 'base_url'**optional)
.then(result => console.log(result));
helper.clarifyBlockchainToken('hash-token', 'base_url'**optional)
.then(result => console.log(result));
let form = {
"login":"login",
"password":"password",
"owner":"owner"
};
helper.getToken(form, 'base_url'**optional)
.then(token => console.log(token));
helper.check('hash-token', 'base_url'**optional)
.then(result => console.log(result));
helper.clarify('hash-token', 'base_url'**optional)
.then(result => console.log(result));
helper.refresh('hash-token', 'base_url'**optional)
.then(result => console.log(result));
let new_properties = {
"unit" : 0,
"time" : 0,
"language": "language" ,
"environment": "environment"
};
helper.refresh('hash-token', new_properties, 'base_url'**optional)
.then(result => console.log(result));
helper.endpoint('hash-token', 'base_url'**optional)
.then(result => console.log(result));