tws-auth
Node.js SDK of TWS (Teambition Web Service) client.
Installation
npm i --save tws-auth
Usage
const TWS = const tws = appId: '78f95e92c06a546f7dab7327' appSecrets: 'app_secret_new' 'app_secret_old' host: 'https://auth.teambitionapis.com' ; { console console console console}
Documentation
const Client =
new Client({ appId, appSecret[, host, timeout, cacheStore, rootCert, privateKey, certChain] })
- appId
String
: The ID of your TWS application. - appSecrets:
[]String
: The secret passwords of your TWS application. - host
String
: Optional, host URL of TWS authorization service, by default is'https://auth.teambitionapis.com'
. - timeout
Number
: Optional, requst timeout in milliseconds, by default is3000
. - rootCert
Buffer
: Optional, the client root certificate. - privateKey
Buffer
: Optional, the client certificate private key. - certChain
Buffer
: Optional, the client certificate cert chain. - maxSockets
Number
: Optional, the client sockets. - time
Boolean
: Optional, enable timing for request. - retryDelay
Number
: Optional, delay time for retry, default to 200 ms. - maxAttempts
Number
: Optional, max attempts for a request, default to 3 times. - retryErrorCodes
[]String
: Optional, error codes that should retry, default to['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN']
.
Client API
https://teambition.github.io/tws-auth/
More:License
tws-auth
is licensed under the MIT license.
Copyright © 2017-2020 Teambition.