Skip to content

No longer clear authorization before returning from getServerSpec - #347

Merged
isc-klu merged 3 commits into
intersystems-community:masterfrom
isc-klu:donot-clear-password
Aug 13, 2026
Merged

isc-klu merged 3 commits into
intersystems-community:masterfrom
isc-klu:donot-clear-password

Conversation

@isc-klu

@isc-klu isc-klu commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes #348.

The ServerSpec returned by getServerSpec() in src/commonActivate.ts is constructed by getServerSpec() in src/api/getServerSpec.ts. I verified that every code path in the latter function returns a resolved Authorization object only when:

  • The authorization has already been resolved by the VS Code ObjectScript extension, or
  • The password is readily available in settings.json.

Because of this, it is safe for getServerSpec() to return the Authorization object without clearing its access token.

This PR removes the access token clearing logic and makes a small refactoring to src/api/getServerSpec.ts to clarify the control flow.

@isc-klu
isc-klu marked this pull request as draft August 12, 2026 22:13
@isc-klu
isc-klu requested review from gjsjohnmurray and isc-bsaviano and removed request for isc-bsaviano August 13, 2026 13:24
@isc-klu
isc-klu marked this pull request as ready for review August 13, 2026 13:32
@isc-klu isc-klu changed the title Avoid clearing credentials No longer clear authorization before returning from getServerSpec Aug 13, 2026

@gjsjohnmurray gjsjohnmurray left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me

@isc-klu
isc-klu merged commit b7b9526 into intersystems-community:master Aug 13, 2026
3 checks passed
@isc-klu
isc-klu deleted the donot-clear-password branch August 13, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passwords in vscode setting.json are not passed directly to the InterSystems ObjectScript extension.

2 participants