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

Support AuthorizationHandlers on OpenAPI Operations #2285

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ikstewa
Copy link
Contributor

@ikstewa ikstewa commented Oct 18, 2022

When attempting to register an AuthorizationHandler on an Operation within the OpenAPI3RouterBuilder the resultant router will fail to build because the AuthZ handler is registered after the generated validation handler.

Adding the ability to register AuthorizationHandlers on an Operation. All handlers added using the new authorizationHandler method will be registered after the security handlers but before the validation and user handlers.

Motivation:

#2191

Conformance:

Your commits should be signed and you should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines

When attempting to register an AuthorizationHandler on an Operation
within the OpenAPI3RouterBuilder the resultant router will fail to build
because the AuthZ handler is registered after the generated validation
handler.

Adding the ability to register AuthorizationHandlers on an Operation.
All handlers added using the new authorizationHandler method will be
registered after the security handlers but before the validation and
user handlers.
@ikstewa
Copy link
Contributor Author

ikstewa commented Jan 27, 2023

@pmlopes Any suggestions on how I can help move this forward?

@olenagerasimova
Copy link

waiting for this feature

@ikstewa
Copy link
Contributor Author

ikstewa commented Sep 12, 2023

Linked issues show it fixed in #2405 which is part of vertx 5.x I have not tested with vertx 5 yet.

@pk-work
Copy link
Contributor

pk-work commented May 31, 2024

Hi,

this is a PR related to a not longer maintained component. Do you know that there is a complete rebuild of Vert.x OpenAPI Router [1]? In Vert.x 5 this router has also support for AuthorizationHandlers [2].

Maybe this solves your problem. Is this PR still valid? If yes, please rebase this PR as there are conflicts.

[1] https://vertx.io/docs/vertx-web-openapi-router/java/
[2] https://vertx.io/vertx5/docs/vertx-web-openapi-router/java/#_define_security_handlers

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

Successfully merging this pull request may close these issues.

4 participants