Giter Club home page Giter Club logo

Comments (12)

michalvavrik avatar michalvavrik commented on August 15, 2024 2

Looks very interesting and will help me with #40622. Thanks

from quarkus.

michalvavrik avatar michalvavrik commented on August 15, 2024 1

@michalvavrik We could also add a method to the interface to be able to filter the endpoints by id, i.e. io.quarkus.websockets.next.WebSocket.endpointId().

I like that, I can refactor #40873 to use that instead.

from quarkus.

michalvavrik avatar michalvavrik commented on August 15, 2024

Quarkus REST https://quarkus.io/guides/rest has https://javadoc.io/doc/io.quarkus.resteasy.reactive/resteasy-reactive/3.10.2/org/jboss/resteasy/reactive/server/ServerExceptionMapper.html that allows to register either global mapper for all the REST resources, or just for the one resources where the bean is produced.

For WS Next, it could be of interest to register this new interface for one endpoint only to avoid path-matching inside that bean.

from quarkus.

michalvavrik avatar michalvavrik commented on August 15, 2024

Maybe later though. Let's start with the global one.

from quarkus.

mkouba avatar mkouba commented on August 15, 2024

Maybe later though. Let's start with the global one.

Agreed. Let's start with the global one and improve later on (if needed ;-)

from quarkus.

geoand avatar geoand commented on August 15, 2024

Definitely +1 on focusing on global and then moving to per class

from quarkus.

michalvavrik avatar michalvavrik commented on August 15, 2024

Definitely +1 on focusing on global and then moving to per class

hey @geoand , yes as far as user beans go, but it would be ineffective to have a global bean applied on every endpoint and then start matching request with a bean to determine if you need to run it. If I need to secure just one endpoint of all, I think it's better to have a local endpoint specific. in #40873 I added build item for that, so it's Quarkus internal but it will exist.

from quarkus.

geoand avatar geoand commented on August 15, 2024

I'll have to have a look in a few days

from quarkus.

michalvavrik avatar michalvavrik commented on August 15, 2024

I'll have to have a look in a few days

sure, no hurry, thx

from quarkus.

geoand avatar geoand commented on August 15, 2024

👍🏼

from quarkus.

mkouba avatar mkouba commented on August 15, 2024

Definitely +1 on focusing on global and then moving to per class

hey @geoand , yes as far as user beans go, but it would be ineffective to have a global bean applied on every endpoint and then start matching request with a bean to determine if you need to run it. If I need to secure just one endpoint of all, I think it's better to have a local endpoint specific. in #40873 I added build item for that, so it's Quarkus internal but it will exist.

@michalvavrik We could also add a method to the interface to be able to filter the endpoints by id, i.e. io.quarkus.websockets.next.WebSocket.endpointId().

interface HttpUpgradePolicy {

   boolean appliesTo(String endpointId);

   Uni<CheckResult> checkUpgrade(HttpUpgradeContext context);
}

from quarkus.

michalvavrik avatar michalvavrik commented on August 15, 2024

Done.

from quarkus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.