@zeroid/trimble.identity.passwordgranttokenprovider
v0.1.0
Published
An implementation of ITokenProvider for OAuth password grant type
Downloads
2
Maintainers
Readme
Trimble.Identity.PasswordGrantTokenProvider
Installation
npm install @zeroid/trimble.identity.passwordgranttokenprovider
Usage
var PasswordGrantTokenProvider = require('@zeroid/trimble.identity.passwordgranttokenprovider');
var tokenProvider = new PasswordGrantTokenProvider(endpointProvider, 'consumerKey', 'consumerSecret');
tokenProvider.login('username', 'password')
.then(() => {
tokenProvider.retrieveToken()
.then((token) => {})
.catch(() => {});
})
.catch(() => {});