Skip to content

Commit

Permalink
rename option to type
Browse files Browse the repository at this point in the history
  • Loading branch information
sandragolden committed Nov 15, 2023
1 parent bd595ea commit bc7bc83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ program
.option('-a, --authserver [authserver]','The authorization server used to authenticate')
.option('-r, --renew','Controls whether the authentication should be automatically renewed, ' +
'once the token expires.')
.option('-t, --granttype [granttype]','The grant type to use (password or client_credentials)')
.option('-t, --type [type]','The grant type to use (password or client_credentials)')
.description('Authenticate an API client with an optional user for automation use')
.action(function(client, secret, user, user_password, options) {
var renew = ( options.renew ? options.renew : false );
var grantType = ( options.granttype === 'client_credentials' ? 'client_credentials' : 'password' );
var grantType = ( options.type === 'client_credentials' ? 'client_credentials' : 'password' );
require('./lib/auth').auth(client, secret, user, user_password, renew, options.authserver, grantType);
}).on('--help', function() {
console.log('');
Expand Down

0 comments on commit bc7bc83

Please sign in to comment.