-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add bearer auth scheme as the default security scheme #4386
Comments
This comment has been minimized.
This comment has been minimized.
@dougal83 ah, true |
Regarding the comment
Exactly what are we talking about here? The Or Because the OpenAPI spec examples above (not the screen cap) do not have Please clarify. Thanks :) |
Hey @emonddr This issue is to enhance the openApi spec by adding to components. I've just jumped on it to suggest a name change from Considering the top level "security": [
{
"jwt": []
}
], Really me nitpicking atm. |
@strongloop/loopback-next @strongloop/loopback-maintainers @mschnee Call for contribution: Happy contributing! |
add security enhancer to add default security scheme impl. loopbackio#4386 Signed-off-by: Douglas McConnachie <[email protected]>
add security enhancer to add default security scheme impl. loopbackio#4386 Signed-off-by: Douglas McConnachie <[email protected]>
@jannyHou For clarification, is this story to add jwt strategy /w enhancer to base project generator template? |
I have a busy March so unassigned in case someone else wishes to help in the meantime. |
@jannyHou @raymondfeng, could you please clarify? Thanks. |
after having the jwt authentication component extracted in examples/access-control-migration, I am thinking refactor the strategy in this example to extend the enhancer and provide jwt auth spec by default. I am not sure if @raymondfeng still wants to have the authorize button enabled for explorer for ANY loopback app w/ or w/o authentication enabled. cc @raymondfeng WDYT? |
@jannyHou, is it possible to show/hide the authorize button based on whether the app has authentication enabled? |
How about we always show the authorize button, as the first iteration? It's better to always show the button/field than always hide! cc @raymondfeng |
created PR in #5493 |
Closing as done. |
Suggestion
After story #4380 finished, we can add a security spec enhancer to have the bearer auth scheme as the default(or built-in) security scheme. So that explorer has the authorization dialog for people to inject the token per request.
Use Cases
Add an OAI enhancer that add the following spec into OpenAPI spec generated in the rest server:
Examples
See the screenshot in https://loopback.io/doc/en/lb4/Authentication-Tutorial.html#specifying-the-security-settings-in-the-openapi-specification
Acceptance criteria
The text was updated successfully, but these errors were encountered: