Skip to content

How to replace Basic Authentication of usrid & pwd with the JWT token #2183

Closed Answered by traeok
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @inv9wj1,

For clarification, are you developing a program using Zowe CLI (or its SDKs)? Or are you using Zowe CLI with a Team Configuration file set up for your mainframe instance?

If you are developing using Zowe CLI/SDKs, you can provide the JWT token in the tokenValue property of a session, and then you can use that session with our available APIs. For example, with the z/OS Files SDK:

const profInfo = new ProfileInfo("zowe");
await profInfo.readProfilesFromDisk();
const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
const session = imperative.ProfileInfo.createSession(zosmfMergedArgs.

Replies: 1 comment 22 replies

Comment options

You must be logged in to vote
22 replies
@t1m0thyj
Comment options

@ghost
Comment options

@t1m0thyj
Comment options

@ghost
Comment options

@traeok
Comment options

Answer selected by t1m0thyj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants