Socket
Socket
Sign inDemoInstall

verzth-tcx-js-angular

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    verzth-tcx-js-angular

Angular TCX JS Provider


Version published
Maintainers
1
Created

Readme

Source

tcx-js

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

It's standalone library (not include TCX JS)

Dependencies

Installation

NPM

npm i verzth-tcx-js-angular

or

npm i --save verzth-tcx-js-angular

How to Use:

  1. Use TCX in your providers and inject it in your related component constructor.

    .....
    import {TCX} from 'verzth-tcx-js-angular/tcx-ng';
    .....
    
    @Component(
     {
         ...
         providers: [
             TCX
         ]
         ...
     }
    )
    export class YourComponent{
    ...
     constructor(tcx: TCX) {}
    .....
    
  2. Initialize tcx service with params, it will use default value if you don't provide params.

        ...
        constructor(tcx: TCX) {
         tcx.init({
          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 Javascript Library, available in this repository TCX JS

Keywords

FAQs

Last updated on 26 Apr 2019

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