@zeroid/trimble.identity.refreshabletokenprovider
v0.1.0
Published
An implementation of ITokenProvider with support for an OAuth refresh token
Downloads
3
Maintainers
Readme
Trimble.Identity.RefreshableTokenProvider
Installation
npm install @zeroid/trimble.identity.refreshabletokenprovider
Usage
var RefreshableTokenProvider = require('@zeroid/trimble.identity.refreshabletokenprovider');
var tokenProvider = new RefreshableTokenProvider(endpointProvider, 'consumerKey', 'consumerSecret', 'accessToken', new Date(expiryTime), 'refreshToken');
tokenProvider.retrieveToken()
.then((token) => {})
.catch(() => {});