0.0.6 • Published 5 years ago

verzth-tcx-js v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

tcx-js

Javascript Library for TCX Authentication Module, it use in client side to help make auth simpler.

Dependencies

Installation

NPM

npm i verzth-tcx-js

or

npm i --save verzth-tcx-js

How to Use:

  1. Add script in your html.

    <script src="{file_path}/tcx.js"></script>
  2. Initialize tcx object with params, it will use default value if you don't provide params.

    var tcx = new TCX({
     url : '',
     app_id : '',
     secret_key : '',
     public_key : '',
     auth : 'param', // available param, time and none.
     master_key : ''
    });
  3. Available function:

    • getAppID() : string
    • getAppPass(object: Object) : string
    • getToken(callback)
    • getRefreshToken(callback)
    • clearToken()
    • getMasterToken() : string
    • getTime() : string // return tcx_datetime value, but you need to assign it to your parameter (assign it before call getAppPass!).
    • appendTime(object: Object) : object // return your parameter with tcx_datetime injected (assign it before call getAppPass!).

Note: This module not handle your http request, it just help you create the credentials.

TCX JS also provide service for Angular 7, available in this repository @Angular TCX JS

0.0.6

5 years ago

0.0.5

5 years ago

0.0.3-a

5 years ago

0.0.3

5 years ago

0.0.2-b

5 years ago

0.0.2-a

5 years ago

0.0.2

5 years ago

0.0.1-d

5 years ago

0.0.1-c

5 years ago

0.0.1-b

5 years ago

0.0.1-a

5 years ago

0.0.1

5 years ago