Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #436 from zowe/prompting-fix
Browse files Browse the repository at this point in the history
Fixing prompting in ConnectionPropsForSessCfg
  • Loading branch information
zFernand0 authored Aug 21, 2020
2 parents 9358746 + cccdc15 commit 04c9ea0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Imperative package will be documented in this file.

## Recent Changes

- Updated the SSO Callback so it doesn't prompt for user/password if a token exists

## `4.8.0`

- Add the SSO Callback to allow other applications to call their own function in validating sessions
Expand Down
12 changes: 7 additions & 5 deletions packages/rest/src/session/ConnectionPropsForSessCfg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ export class ConnectionPropsForSessCfg {
promptForValues.push("port");
}

if (ConnectionPropsForSessCfg.propHasValue(finalSessCfg.user)=== false) {
promptForValues.push("user");
}
if (ConnectionPropsForSessCfg.propHasValue(finalSessCfg.tokenValue)=== false) {
if (ConnectionPropsForSessCfg.propHasValue(finalSessCfg.user)=== false) {
promptForValues.push("user");
}

if (ConnectionPropsForSessCfg.propHasValue(finalSessCfg.password)=== false) {
promptForValues.push("password");
if (ConnectionPropsForSessCfg.propHasValue(finalSessCfg.password)=== false) {
promptForValues.push("password");
}
}

// put all the needed properties in an array and call the external function
Expand Down

0 comments on commit 04c9ea0

Please sign in to comment.