solinftec-auth-lib-testdeprecated

Library to helper auth-api use.

Usage no npm install needed!

<script type="module">
  import solinftecAuthLibTest from 'https://cdn.skypack.dev/solinftec-auth-lib-test';
</script>

README

Library to helper solinftec-auth-api use.

Install

    npm i solinftec-auth-lib-test --save

Usage

import

    import Auth from 'solinftec-auth-lib'

    let helper = new Auth();

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

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

get endpoints

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