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

bru.getAuthMode() return unexpected values when request has set "inherit" #2307

Open
2 tasks done
norman-knott opened this issue May 14, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@norman-knott
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

I am trying to use the oauth2 mode in the collection, and to set the "Authentication" header only if the request is setup to use an authentication. Because I have also requests that should not add authentication information.

But bru.getAuthMode() returns unexpected values when executed in a request that has setup to inherit the authentication mode from the collection.

I attached an example collection, so you can reproduce it easier.

So far I got two different values bearer and none.
bearer is returned by my original collection. I guess it is somehow because before I used bearer mode instead of oauth2.
none is returned by the example collection I attached.
But in both collections I set oauth2 for the collection and inherit for the request, as you can see in the attached screenshots. Also in the .bru files it set correctly.

I think it should return one of:

  • authentication mode inherited by collection
  • inherit
    • if this is returned there should be a possibility to get the mode of the collection

.bru file to reproduce the bug

getAuthMode_problem.zip

Screenshots/Live demo link

collection:
image

image

request:
image

image

@norman-knott norman-knott added the bug Something isn't working label May 14, 2024
@norman-knott
Copy link
Author

Any idea about this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant