-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for ltpa token #219
base: main
Are you sure you want to change the base?
Conversation
@davenice I'm just going to refactor now and remove the profile config. |
f88f1d5
to
fd79504
Compare
7c4bd64
to
1cd8078
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a lot of the resource trees (CICSProgramTree), we're not using the new getters to get the session - might be nice if possible?
Might be nice to be able to do this.getSession()
here like the combination trees.
const programResponse = await getResource(this.parentRegion.parentSession.session, { |
@@ -282,9 +268,8 @@ export class ProfileManagement { | |||
/** | |||
* Return all the regions in a given plex | |||
*/ | |||
public static async getRegionInfoInPlex(plex: CICSPlexTree): Promise<any[]> { | |||
public static async getRegionInfoInPlex(plex: CICSPlexTree, session: Session): Promise<any[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably get the session (2nd arg) from the plex tree (1st arg) using getParent
or getSession
, or a combination, right? Although it's not exactly messy currently so optional.
packages/vsce/src/trees/CICSCombinedTrees/CICSCombinedWebServiceTree.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 😋
Haven't had a chance to test this, but the changes make sense to me! 😋
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like we have to make the same/similar changes across all/most CICSCombinedTrees.
Wondering if there is some consolidation that can be done (in a future PR) to create a BaseCombinedTree class that the others extend 😋
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refactor is actually in progress in this PR. Because all the resource and combined resource trees are practically identical, we can use common tree classes for them all :D
this.session = new imperative.Session({ | ||
type: "basic", | ||
type: SessConstants.AUTH_TYPE_TOKEN, | ||
storeCookie: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I mentioned that perhaps we could move some of the LTPA token support to the CLI.
However, it makes sense the way this is being done here since (as you mentioned on the last standup) this is all handled by Imperative.
Curious if the CICs plug-in could make use the the LTPA token when the CLI is in Daemon mode. 😋
No need to worry about testing this, since people haven't asked for this feature yet 😋
50424cb
to
e132aca
Compare
22fb9a1
to
a602446
Compare
Signed-off-by: enam-khan <[email protected]>
a5251ac
to
e4447ab
Compare
Signed-off-by: enam-khan <[email protected]>
Signed-off-by: enam-khan <[email protected]>
Signed-off-by: enam-khan <[email protected]>
Signed-off-by: enam-khan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes, will also test functionality locally
@@ -4,9 +4,11 @@ All notable changes to the "cics-extension-for-zowe" extension will be documente | |||
|
|||
## Recent Changes | |||
|
|||
- Enhancement:Use LTPA tokens to allow CMCI "sessions" [#217](https://github.com/zowe/cics-for-zowe-client/issues/217) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Enhancement:Use LTPA tokens to allow CMCI "sessions" [#217](https://github.com/zowe/cics-for-zowe-client/issues/217) | |
- Enhancement: Use LTPA tokens to allow CMCI "sessions" [#217](https://github.com/zowe/cics-for-zowe-client/issues/217) |
|
||
## Recent Changes | ||
|
||
- Enhancement: Use LTPA tokens to allow CMCI "sessions". [#217](https://github.com/zowe/cics-for-zowe-client/issues/217) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure adding some constants to the package warrants a changelog entry talking about LTPA tokens. I think we should change this to be something along the lines of...
- Enhancement: Use LTPA tokens to allow CMCI "sessions". [#217](https://github.com/zowe/cics-for-zowe-client/issues/217) | |
- Enhancement: Added CICS resource names to available constants. [#217](https://github.com/zowe/cics-for-zowe-client/issues/217) |
@@ -18,6 +18,11 @@ export const CicsCmciConstants = { | |||
*/ | |||
CICS_SYSTEM_MANAGEMENT: "CICSSystemManagement", | |||
|
|||
/** | |||
* Specifies the required part of the REST interface URI to access initialization parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Specifies the required part of the REST interface URI to access initialization parameter | |
* Specifies the required part of the REST interface URI to access system initialization parameters |
* Specifies the required part of the REST interface URI to access tcp/ip service definitions | ||
*/ | ||
CICS_DEFINITION_TCPIPSERVICE: "CICSTCPIPService", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not accurate. The comment and constant name suggests definitions, but the actual resource name suggests the installed resource. Which do you need here?
let count = 0; | ||
while (count <= 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe changing count
to be a more readable boolean could be nice, although it'll achieve the same result.
I also wonder if there's a way we can achieve this without a while loop, perhaps moving the functionality inside the while to another method, and calling it from the try block AND the catch (if the 401 is received). Perhaps unecessary change at this point though - depends how strongly others feel about a while loop!
This pr is a work in progress to add support for a using the ltpa token.
#217
How to Test
Review Checklist
I certify that I have:
Additional Comments