Skip to content
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

RestClient.buildOptions doesn't support session with AUTH_TYPE_NONE #2219

Closed
t1m0thyj opened this issue Aug 7, 2024 · 1 comment · Fixed by #2218 or zowe/zowe-explorer-vscode#3044
Assignees
Labels
bug Something isn't working new The issue wasn't triaged yet

Comments

@t1m0thyj
Copy link
Member

t1m0thyj commented Aug 7, 2024

Describe the bug

Since CLI v7.24.1, issuing a request thru the Imperative REST client with type = "none" fails with an error:
ImperativeError: No credentials for a BASIC or TOKEN type of session.

Expected and actual results

Credentials should not be required when the session type is AUTH_TYPE_NONE, and the following code should work:

const { RestClient, Session } = require("@zowe/imperative");
const mySession = new Session({
    hostname: "example.com",
    port: 443,
    type: "none"
});
const restClient = new RestClient(mySession);
console.log(restClient.buildOptions("/api/v1", "GET"));

Describe your environment

Additional context

@t1m0thyj t1m0thyj added bug Something isn't working new The issue wasn't triaged yet labels Aug 7, 2024
@t1m0thyj t1m0thyj self-assigned this Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new The issue wasn't triaged yet
Projects
Status: Closed
1 participant