Socket
Socket
Sign inDemoInstall

@verzth/tcx-js

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @verzth/tcx-js

TCX Client JS Library


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
6.01 MB
Created
Weekly downloads
 

Readme

Source

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, use tcx.min.js for minified version, or you can use tcx.bundle.js for minified version which was included cryptojs and moment, all our bundle (By verzth) doesn't include jquery, so you need to add your own script (Because jquery frequently used by developers).

    <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

Keywords

FAQs

Last updated on 27 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc