-
Notifications
You must be signed in to change notification settings - Fork 83
Authorization: config or default to Bearer token approach #67
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
Comments
I think this might be a bug. The intended behavior is that you would only have to toggle between auth modes that are specified in the OpenAPI definition (in the order that they are listed), but I think the component incorrectly always shows both basic and bearer auth modes when any auth modes are listed. I am unable to make any contributions at the moment, but I believe @avaidyam added the basic auth support, so he might be able to help resolve this. I am also happy to get a PR merged if you want to attempt to fix this. The relevant code can be found here: |
@simranbentel Right, as @bourdakos1 says, it's supposed to work off of the different auth types present in the OpenAPI specification. I recall hardcoding support for basic auth in addition to the previously present Bearer auth. This may take some extra work to implement properly, I think. |
Thanks @avaidyam. Looking at the Authorization component I see a clear path to getting the Bearer auth to show by default and hiding the switch button. I will make a fork with those changes for the time being. Will check back to see when you get this fully implemented based on the security scheme. Cheers! |
I should be able to work on this now |
@simranbentel This should be available in the next release |
@bourdakos1 I have installed v0.2.2 and integrated via preset. The Authorization panel contains only a "Save" button for me. No input is being rendered. In my swagger json and each endpoint method contains: Expected: Bearer input should display as in v0.1 of the package. Is this still being worked on? |
@simranbentel it expects |
My backend dev says the case is standard for swagger. I think you should be looking for initial case "Bearer". But you could also add |
Yea, I can do that :) Do you mind opening a separate issue for this? |
Looks like scheme is intended to be case insensitive OAI/OpenAPI-Specification#1876 |
@simranbentel |
@bourdakos1 Confirmed, it is working now. Thank you! |
Is there any way for the Authorization UI to default to the Bearer token input? Users of my site will need to figure out switching the user/pass inputs to Bearer token. I tried use CSS to alter the presentation but the React logic is not allowing that approach.
The text was updated successfully, but these errors were encountered: