-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Swagger UI should automatically inject Authorization header when JWT is specified. #18614
Comments
Hi thanks for this. Do you have a reproducer ? |
(I’m running this through my phone right now, apologies.) Sorry, as in, another person who has run into this? |
As in a small app you can share that show the error. |
Ah, cheers. Let me quickly bang something out and I’ll throw it into GitHub as a public repo. 👍🏻 |
Thanks ! |
See https://github.com/cpilson/quarkus-smallrye-jwt-issue I've repro'd just now. The JWT resource code is Sebi's, from Devoxx, so that'll look familiar. :D |
Great ! Thanks. Looking at it now. |
Ok, You still need to indicate what method(s) the security should apply on. Example, adding
to the
You can also
and then you would change the name in the If you do not want to use annotations on the methods, you can create a filter that add the Hope this help. |
User error? Oh man, I am so sorry about that. :( Thank you so much for looking into it. |
No problem. It's not really a user error. I guess we could try and add a property to auto-add all methods that also have |
Describe the bug
From https://stackoverflow.com/questions/68327095/how-do-i-properly-auth-with-jwt-to-openapi-ui-for-quarkus-smallyre-jwt
The UI doesn’t inject the Authorization header into the cURL command.
Expected behavior
The UI should inject
-H “Authorization: <type> <JWT>”
into the cURL command.Actual behavior
CURL happens without a -H
”Authorization…”
entry.How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
11.0.2 (OpenJDK)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.0.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional information
No response
The text was updated successfully, but these errors were encountered: