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

Need to pass auth header and having issues #83

Open
w100frt opened this issue Jun 27, 2022 · 1 comment
Open

Need to pass auth header and having issues #83

w100frt opened this issue Jun 27, 2022 · 1 comment

Comments

@w100frt
Copy link

w100frt commented Jun 27, 2022

Hello - currently trying to use reportportal via CLI and I need a way to pass an auth header. I did not see headers as a specific option for newman and report portal so was attempting to use restClientConfig like this:

newman run {{myPostmanUrl}} --folder '$(area)' --reporter-htmlextra-darkTheme --reporter-htmlextra-logs --reporter-htmlextra-testPaging --reporter-htmlextra-omitHeaders --reporter-htmlextra-noSyntaxHighlighting --reporter-htmlextra-title {{myTitle}} -r htmlextra,testrail,@reportportal/agent-js-postman --timeout-script 4000000 -n 1 -e {{myPostmanEnv}}
--reporter-@reportportal/agent-js-postman-debug=true
--reporter-@reportportal/agent-js-postman-endpoint={{myReportPortalUrl}}
--reporter-@reportportal/agent-js-postman-token={{reportPortalToken}}
--reporter-@reportportal/agent-js-postman-launch={{myLaunchName}}
--reporter-@reportportal/agent-js-postman-project={{reportPortalProject}}
--reporter-@reportportal/agent-s-postman-description={{testDescription}}
--reporter-@reportportal/agent-js-postman-restClientConfig="{rejectUnauthorized:false,params: {access_token: 'XXXX'},headers: { Authorization: 'Basic XXXXX }}" \

When I try this I get a 401 from Report Portal but I know my credentials are correct. Any ideas?

@AmsterGet
Copy link
Member

Hello @w100frt !
Could you describe your case in more detail?
Why do you need to pass authentication headers? If the token is present, it should be sufficient to report the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants