Secken SDK for Javascript
Install
npm install secken-api
Usage
require && config
var Secken = ; var sk = app_id: "" app_key: "" auth_id: "";
After initialization, Secken-api can help you to develop you project.
Most of Secken-api's functions will return a promise object which using q
, then you can use the primose object embed into you project.
Get Bind Qrcode Image Url
sk;
Get Auth Qrcode Image Url
sk;
Realtime Auth
sk;
Get Result
sk;
This function will repeat getting result, the default delay time is 1000
ms, you can use parameter time
to set the delay time, and you can use the primose's notify
function to get each response.
If you pass false
as the value of time
, it will run only once.
Offline Auth
sk;
Get Auth Page Url
var url = sk;
Get Signature
getSignature(params [,ignore])
, pass an object type value for params
and an array type value for ignore
.
You can use this function to get the signature string of a params object.
var signature = sk;
Change log
2.0.4
- use ES6
- change init params' key
- add
request()
function - update
request
to 2.67.0