0.0.15 • Published 5 years ago

solinftec-auth-lib v0.0.15

Weekly downloads
43
License
ISC
Repository
github
Last release
5 years ago

Library to helper solinftec-auth-api use.

Install

    npm i solinftec-auth-lib --save

Usage

import

    import Auth from 'solinftec-auth-lib'

    let helper = new Auth();

    helper.setOrigin('node');
    
    // **optional
    // helper.setUrl('base_url');

blockchain

get token

    let form = {
                "email":"email",
                "password":"password"
                };

    helper.getBlockchainToken(form, 'base_url'**optional)
          .then(token => console.log(token));

check token

    helper.checkBlockchainToken('hash-token', 'base_url'**optional)
          .then(result => console.log(result));

clarify token

    helper.clarifyBlockchainToken('hash-token', 'base_url'**optional)
          .then(result => console.log(result));

sgpa

get token

    let form = {
                "login":"login",
                "password":"password",
                "owner":"owner"
                };

    helper.getToken(form, 'base_url'**optional)
          .then(token => console.log(token));

check token

    helper.check('hash-token', 'base_url'**optional)
          .then(result => console.log(result));

clarify token

    helper.clarify('hash-token', 'base_url'**optional)
          .then(result => console.log(result));

refresh token

    helper.refresh('hash-token', 'base_url'**optional)
          .then(result => console.log(result));

update token

    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));

get endpoints

    helper.endpoint('hash-token', 'base_url'**optional)
          .then(result => console.log(result));
0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

6 years ago