Integrated user-defined session policies without changing original configurations
Comment From: jzheaux
Thanks for the report, @leshalv. To make sure this is the right addition to the DSL, can you please describe in more detail what it is that you are trying to do?
In the meantime, note that you can add a user-defined session policy already by post-processing the CompositeSessionAuthenticationStrategy like so:
http
.sessionManagement((session) -> session
.withObjectPostProcessor(new ObjectPostProcessor<CompositeSessionAuthenticationStrategy>() {
@Override
public <O extends CompositeSessionAuthenticationStrategy> O postProcess(O strategy) {
return new CompositeSessionAuthenticationStrategy(new MyStrategy(), strategy);
}
})
)
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: leshalv
Thanks for the report, @leshalv. To make sure this is the right addition to the DSL, can you please describe in more detail what it is that you are trying to do?
In the meantime, note that you can add a user-defined session policy already by post-processing the
CompositeSessionAuthenticationStrategylike so:
java http .sessionManagement((session) -> session .withObjectPostProcessor(new ObjectPostProcessor<CompositeSessionAuthenticationStrategy>() { @Override public <O extends CompositeSessionAuthenticationStrategy> O postProcess(O strategy) { return new CompositeSessionAuthenticationStrategy(new MyStrategy(), strategy); } }) )
Thanks for this solving my problem