Skip to content

Is there any way to access session? #74

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

Closed
yameizi001 opened this issue Mar 19, 2024 · 2 comments
Closed

Is there any way to access session? #74

yameizi001 opened this issue Mar 19, 2024 · 2 comments
Labels
question Further information is requested

Comments

@yameizi001
Copy link
Contributor

Describe the feature

I want to use session in ProxyInterceptor, is there any way to access session? If has, how to get it. Thanks very much!

@yameizi001 yameizi001 added the enhancement New feature or request label Mar 19, 2024
@tsegismont tsegismont added question Further information is requested and removed enhancement New feature or request labels Mar 19, 2024
@tsegismont
Copy link
Contributor

It's not currently possible. As a workaround you can put a reference to the Vert.x Web RoutingContext in local context data with io.vertx.core.Context#putLocal before handing over the request to proxy, then retrieve it in the interceptor with io.vertx.core.Context#getLocal.

We have plans to let users provide any kind of contextual data in #71

@tsegismont tsegismont closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
@vietj
Copy link
Member

vietj commented Mar 19, 2024

I think it is better to use https://github.com/vert-x3/vertx-web/blob/master/vertx-web/src/main/java/io/vertx/ext/web/WebServerRequest.java , casting the HttpServerRequest to WebServerRequest and then get the routing context and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants