0.1.4-a • Published 5 years ago
verzth-tcx-js-angular v0.1.4-a
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:
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) {} .....
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 : '' }); } ...
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
0.1.4-a
5 years ago
0.1.3-a
5 years ago
0.1.2-a
5 years ago
0.1.1-a
5 years ago
0.1.0-a
5 years ago
0.0.3-a
5 years ago
0.0.3
5 years ago
0.0.2-h
5 years ago
0.0.2-g
5 years ago
0.0.2-f
5 years ago
0.0.2-e
5 years ago
0.0.2-d
5 years ago
0.0.2-c
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-b
5 years ago
0.0.1-a
5 years ago
0.0.1
5 years ago