Skip to content

StompSubProtocolHandler should send SessionSubscribeEvent after ChannelSecurityInterceptor has validated access rights [SPR-13339] #17924

@spring-projects-issues

Description

@spring-projects-issues

pascal gehl opened SPR-13339 and commented

Only "Platinium" user of my application can subscribe to a dedicated /topic/platinum topic.
Every time an authorized user subscribes I want to run some code. For this I implemented ApplicationListener< SessionSubscribeEvent >.

Unauthorized users should receive the equivalent of 403 Unauthorized response.

Unfortunately my ApplicationListener< SessionSubscribeEvent > is called wether the user is authorized or not and I could not find where to hook some code after ChannelSecurityInterceptor has been executed.

@SubscribeMapping only works for /app/platinum but I really want to execute some code when user subscribes to /topic/platinum.


Affects: 4.1.7

Referenced from: commits 27899ab

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions